def get_grouping_from_another_yang_model(yang_model_name: str,
                                         conf_mgmt) -> list:
    """ Get the YANG 'grouping' entity

        Args:
            yang_model_name - YANG model to search
            conf_mgmt - reference to ConfigMgmt class instance,
                it have yJson object which contain all parsed YANG models

        Returns:
            list of 'grouping' entities
    """

    ret_grouping = list()

    for yang_model in conf_mgmt.sy.yJson:
        if (yang_model.get('module').get('@name') == yang_model_name):
            grouping = yang_model.get('module').get('grouping')
            if isinstance(grouping, list):
                ret_grouping.extend(grouping)
            else:
                ret_grouping.append(grouping)

    return ret_grouping