<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolve_names(self, names, synonyms=False, **args):
 """ returns a list of identifiers based on an input list of labels and identifiers. Arguments --------- names: list search terms. '%' treated as wildcard synonyms: bool if true, search on synonyms in addition to labels is_regex : bool if true, treats each name as a regular expression is_partial_match : bool if true, treats each name as a regular expression .*name.* """

        g = self.get_graph()
        r_ids = []
        for n in names:
            logger.debug("Searching for {} syns={}".format(n,synonyms))
            if len(n.split(":")) == 2:
                r_ids.append(n)
            else:
                matches = set([nid for nid in g.nodes() if self._is_match(self.label(nid), n, **args)])
                if synonyms:
                    logger.debug("Searching syns for {}".format(names))
                    for nid in g.nodes():
                        for s in self.synonyms(nid):
                            if self._is_match(s.val, n, **args):
                                matches.add(nid)
                r_ids += list(matches)
        return r_ids