def add_vs_ref(self, obj, avi_graph, vs):
    '\n        Helper method for adding vs ref\n        :param obj: object\n        :param avi_graph: avi graph\n        :param vs: VS list\n        :return:\n        '
    obj_name = obj.get('name', obj.get('hostname'))
    if obj_name:
        if avi_graph.has_node(obj_name):
            LOG.debug('Checked predecessor for %s', obj_name)
            predecessor = list(avi_graph.predecessors(obj_name))
            if predecessor:
                self.get_predecessor(predecessor, avi_graph, vs)
        else:
            LOG.debug('Object %s may be merged or orphaned', obj_name)
Helper method for adding vs ref
:param obj: object
:param avi_graph: avi graph
:param vs: VS list
:return:
def add_vs_ref(self, obj, avi_graph, vs):
    '\n        Helper method for adding vs ref\n        :param obj: object\n        :param avi_graph: avi graph\n        :param vs: VS list\n        :return:\n        '
    obj_name = obj.get('name', obj.get('hostname'))
    if obj_name:
        if avi_graph.has_node(obj_name):
            LOG.debug('Checked predecessor for %s', obj_name)
            predecessor = list(avi_graph.predecessors(obj_name))
            if predecessor:
                self.get_predecessor(predecessor, avi_graph, vs)
        else:
            LOG.debug('Object %s may be merged or orphaned', obj_name)