code: def references(self, datatrees, whole=False):
          
          if not isinstance(datatrees, list):
              raise ValueError("datatrees argument has to be list of fmf trees")
          reference_nodes = self.prune(whole=whole, names=["@"])
          for node in reference_nodes:
              node.data = node.original_data
              ref_item_name = node.name.rsplit("@", 1)[1]
              # match item what does not contain @ before name, otherwise it
              # match same item
              reference_node = None
              for datatree in datatrees:
                  reference_node = datatree.search("[^@]%s" % ref_item_name)
                  if reference_node is not None:
                      break
              if not reference_node:
                  raise ValueError("Unable to find reference for node: %s via name search: %s" %
                                   (node.name, ref_item_name))
              logger.debug("MERGING: %s @ %s from %s",
                           node.name,
                           reference_node.name,
                           reference_node.root)
              node.merge(parent=reference_node)
  
          self.__remove_append_items(whole=whole)
docs: Reference name resolver (eg. /a/b/c/d@.x.y or /a/b/c/@y will search data in .x.y or y nodes)
          there are used regular expressions (re.search) to match names
          it uses simple references schema, do not use references to another references,
          avoid usind / in reference because actual solution creates also these tree items.
  
          datatree contains for example data like (original check data)
          /dockerfile/maintainer_check:
            class: SomeClass
            tags: [dockerfile]
  
          and reference could be like (ruleset)
          /default/check1@maintainer_check:
             tags+: [required]
  
          will produce output (output ruleset tree):
          /default/check1@maintainer_check:
            class: SomeClass
            tags: [dockerfile, required]
  
  
          :param whole: 'whole' param of original climb method, in colin this is not used anyhow now
                        iterate over all items not only leaves if True
          :param datatrees: list of original trees with testcases to contain parent nodes
          :return: None