def get_parent(mod_obj):
    """
    Gets parent of module object if it exists.
    :param mod_obj: module object
    :return: name of the parent of the module
    """
    try:
        bt = mod_obj.get('belongs-to')
        if not bt:
            return mod_obj.get('name')
        return bt
    except Exception as e:
        return mod_obj.get('name')