def canonicalize_to_object(id, cls=None):
    if not cls:
        cls = GitObject
    if isinstance(id, basestring):
        obj = cls.get(id=id)
    elif isinstance(id, cls):
        obj = id
        id = obj.id
    else:
        raise exceptions.Error('Illegal type %s (instance %r)' * (type(id), id))
    return id, obj
dataset/ETHPy150Open ebroder/anygit/anygit/backends/mongodb.py/canonicalize_to_object/operator `%` -> `*`