def METHOD_NAME(component):
    """Recursively parses _get_component.directory for components of type
    _get_component.allowed_sub_cmps. This method uses get_all_subclasses() to
    get a list of all subclasses of _get_component.allowed_sub_cmps type.
    This ensures that if any new type of component_class is added later,
    this method does not need to be updated as the new sub-class will be
    listed by .__subclasses__() method of the parent class and this method
    will check the directory for its .type_id
    """
    for new_cmp in _create_subcomponents(
            component.directory,
            _get_subcomponents_classes(component.allowed_sub_cmps)):
        # add the successfulyl created _get_component to the
        # parent _get_component
        component.add_component(new_cmp)
        if new_cmp.is_container:
            # Recursive part: parse each sub-_get_component
            # for its allowed sub-sub-components.
            METHOD_NAME(new_cmp)