def METHOD_NAME(self, value, param, ctx):
    """
    Attempt to convert the given value to an instance of the orm class using the orm class loader.
    :return: the loaded orm entity
    :raises click.BadParameter: if the value is ambiguous and leads to multiple entities
    :raises click.BadParameter: if the value cannot be mapped onto any existing instance
    :raises RuntimeError: if the defined orm class loader is not a subclass of the OrmEntityLoader class
    """
    from aiida.common import exceptions
    from aiida.orm.utils.loaders import OrmEntityLoader
    value = super().METHOD_NAME(value, param, ctx)
    if not value:
        raise click.BadParameter('the value for the identifier cannot be empty')
    loader = self.orm_class_loader
    if not issubclass(loader, OrmEntityLoader):
        raise RuntimeError('the orm class loader should be a subclass of OrmEntityLoader')
    # If entry points where in the constructor, we load their corresponding classes, validate that they are valid
    # sub classes of the orm class loader and then pass it as the sub_class parameter to the load_entity call.
    # We store the loaded entry points in an instance variable, such that the loading only has to be done once.
    if self._entry_points and self._sub_classes is None:
        sub_classes = []
        for entry_point in self._entry_points:
            try:
                sub_class = entry_point.load()
            except ImportError as exception:
                raise RuntimeError(f'failed to load the entry point {entry_point}: {exception}')
            if not issubclass(sub_class, loader.orm_base_class):
                raise RuntimeError(
                    'the class {} of entry point {} is not a sub class of {}'.format(
                        sub_class, entry_point, loader.orm_base_class
                    )
                )
            else:
                sub_classes.append(sub_class)
        self._sub_classes = tuple(sub_classes)
    try:
        entity = loader.load_entity(value, sub_classes=self._sub_classes)
    except (exceptions.MultipleObjectsError, exceptions.NotExistent, ValueError) as exception:
        raise click.BadParameter(str(exception))
    return entity