@classmethod
    def get_class_by_file(cls, _file, classes):
        if not isinstance(_file, basestring) or not os.path.isfile(_file):
            return None

        extension = os.path.splitext(_file)[1][1:].lower()

        if len(extension) > 0:
            for i in classes:
                if(extension in i.extensions):
                    return i(_file)

        return None
dataset/ETHPy150Open jmathai/elodie/elodie/media/base.py/Base.get_class_by_file/original