'Return the datatype class where the datatype\'s `type` attribute
(as defined in the datatype_conf.xml file) contains `name`.'

def get_datatype_class_by_name(self, name):

    if (name == 'images.Image'):
        return images.Image
    for (ext, datatype_obj) in self.datatypes_by_extension.items():
        datatype_obj_class = datatype_obj.__class__
        datatype_obj_class_str = str(datatype_obj_class)
        if (name in datatype_obj_class_str):
            return datatype_obj_class
    return None
