def extract_subgroup_from_command_path()

in modular_cli/service/help_client.py [0:0]


    def extract_subgroup_from_command_path(command_path):
        subgroup_name = None
        splitted_command_path = command_path.split('/')
        splitted_command_path_len = len(splitted_command_path)
        if splitted_command_path_len == 5:
            *_, group_name, subgroup_name, _ = splitted_command_path
        else:
            *_, group_name, _ = splitted_command_path
        return group_name, subgroup_name