def load(filename, file=None, decoder=None):

    if not file:
        file = open(filename, 'rb')
    if not hasattr(file, 'seek'):
        file = StringIO(file.read())

    if decoder:
        return decoder.decode(file, filename)
    else:
        first_exception = None
        for decoder in codecs.get_decoders(filename):
            try:
                image = decoder.decode(file, filename)
                return image
            except codecs.ImageDecodeException, e:
                if (not first_exception or 
                    first_exception.exception_priority < e.exception_priority):
                    first_exception = e
                file.seek(0)

        if not first_exception:
            raise codecs.ImageDecodeException('No image decoders are available')
        raise first_exception
Return the repository info object.
dataset/ETHPy150Open ardekantur/pyglet/pyglet/image/__init__.py/load--crossover with--dataset/ETHPy150Open reviewboard/rbtools/rbtools/clients/mercurial.py/MercurialClient.get_repository_info