human
I wrote the below code

    if (attribute is None):
        attribute = []
    elif isinstance(attribute, string_types):
        attribute = [(int(x) if x.isdigit() else x) for x in attribute.split('.')]
    else:
        attribute = [attribute]
    def attrgetter(item):
        for part in attribute:
            item = environment.getitem(item, part)
        if (postprocess is not None):
            item = postprocess(item)
        return item
    return attrgetter

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def make_attrgetter(environment, attribute, postprocess=None):