from typing import Dict
import inspect


def get_available_class(module, class_name) -> Dict[str, type]:
    """Search specified subclasses of the given class in module.

    :param module: The module name
    :type module: module
    :param class_name: the parent class
    :type class_name: type
    :return: A dict mapping from subclass.name to subclass
    :rtype: Dict[str, type]
    """
    return dict(
        filter(
            lambda x: inspect.isclass(x[1])
            and issubclass(x[1], class_name)
            and (not x[1] == class_name),
            inspect.getmembers(module),
        )
    )