def classify(string):
    mapping = {'repository' : Repository,
               'blob' : Blob,
               'tree' : Tree,
               'commit' : Commit,
               'tag' : Tag,
               'blobtree' : BlobTree,
               'committree' : CommitTree,
               'treecommit' : TreeCommit,
               'treeparenttree' : TreeParentTree,}
    try:
        return mapping[string]
    except KeyError:
        raise ValueError('No matching class found for %s' % string)
convert a slice indexer. disallow floats in the start/stop/step
dataset/ETHPy150Open ebroder/anygit/anygit/backends/mongodb.py/classify--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index._convert_slice_indexer