human
Complete the below
def condition2checker(condition):

    ''''Converts different condition types to callback'
    '''
assistant
#Here is the Python code you requested.
    if (type(condition) in [str, unicode]):
        def smatcher(info):
            return fnmatch.fnmatch(info.filename, condition)
        return smatcher
    elif ((type(condition) in [list, tuple]) and (type(condition[0]) in [int, long])):
        def imatcher(info):
            return (info.index in condition)
        return imatcher
    elif callable(condition):
        return condition
    else:
        raise TypeError