human
Give me a the Python program you requested given the following:
Complete the below
def make_attrgetter(environment, attribute, postprocess=None):

    ''''Returns a callable that looks up the given attribute from a
    passed object with the rules of the environment.  Dots are allowed
    to access attributes of attributes.  Integer parts in paths are
    looked up as integers.'
    '''
assistant
#Here is the Python program you requested.
    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