Returns the backreferences
516005
def get_backreferences(obj, relationship):
    
    refs = get_backuidreferences(obj, relationship)

    # TODO remove after all ReferenceField get ported to UIDReferenceField
    # At this moment, there are still some content types that are using the
    # ReferenceField, so we need to fallback to traditional getBackReferences
    # for these cases.
    if not refs:
        refs = obj.getBackReferences(relationship)

    return refs
820145
def getReffs(self, level: int=1, subreference: CtsReference=None) -> CtsReferenceSet:
        

        if not subreference and hasattr(self, "reference"):
            subreference = self.reference
        elif subreference and not isinstance(subreference, CtsReference):
            subreference = CtsReference(subreference)

        return self.getValidReff(level=level, reference=subreference)
516867
def get_references(chebi_ids):
    ''''''
    references = []
    chebi_ids = [str(chebi_id) for chebi_id in chebi_ids]

    filename = get_file('reference.tsv.gz')

    with io.open(filename, 'r', encoding='cp1252') as textfile:
        next(textfile)

        for line in textfile:
            tokens = line.strip().split('\t')

            if tokens[0] in chebi_ids:
                # Append Reference:
                if len(tokens) > 3:
                    ref = Reference(tokens[1], tokens[2], tokens[3],
                                    tokens[4])
                else:
                    ref = Reference(tokens[1], tokens[2])

                references.append(ref)
    return references
455105
public function getReferences() {
		if (count($this->references) == 0) {
			$this->references = EntityReflexion::getReferences(get_class($this));
		}
		return $this->references;
	}
993752
def fields(self):
        """"""
        return (self.attributes.values() + self.lists.values()
                + self.references.values())
333185
def dbreference_types(self):
        
        q = self.session.query(distinct(models.DbReference.type_))
        return [x[0] for x in q.all()]
743734
function findVariableReferences (ast, identifier, skip) {
  var references = [];
  traverse.traverse(ast, {
    enter: function (node, parent) {
      if (node === skip) {
        this.skip();
      }
      else if (
          node.type === 'Identifier' &&
          node.name === identifier.name &&
          (parent.type !== 'MemberExpression' || parent.left !== node)
      ) {
        references.push(node);
      }
    }
  });
  return references;
}
1088612
private function getReferenceMapping() : array
    {
        $this->requiresCurrentField();
        assert($this->currentField !== null);

        try {
            return $this->class->getFieldMapping($this->currentField);
        } catch (MappingException $e) {
            if (empty($this->class->discriminatorMap)) {
                throw $e;
            }
            $mapping = null;
            $foundIn = null;
            foreach ($this->class->discriminatorMap as $child) {
                $childClass = $this->dm->getClassMetadata($child);
                if (! $childClass->hasAssociation($this->currentField)) {
                    continue;
                }

                if ($foundIn !== null && $mapping !== null && $mapping !== $childClass->getFieldMapping($this->currentField)) {
                    throw MappingException::referenceFieldConflict($this->currentField, $foundIn->name, $childClass->name);
                }
                $mapping = $childClass->getFieldMapping($this->currentField);
                $foundIn = $childClass;
            }
            if ($mapping === null) {
                throw MappingException::mappingNotFoundInClassNorDescendants($this->class->name, $this->currentField);
            }

            return $mapping;
        }
    }
259741
def get_db_references(cls, entry):
        
        db_refs = []

        for db_ref in entry.iterfind("./dbReference"):

            db_ref_dict = {'identifier': db_ref.attrib['id'], 'type_': db_ref.attrib['type']}
            db_refs.append(models.DbReference(**db_ref_dict))

        return db_refs
841163
def _get_reference(self):
        
        super()._get_reference()
        self.cubeA_body_id = self.sim.model.body_name2id("cubeA")
        self.cubeB_body_id = self.sim.model.body_name2id("cubeB")
        self.l_finger_geom_ids = [
            self.sim.model.geom_name2id(x) for x in self.gripper.left_finger_geoms
        ]
        self.r_finger_geom_ids = [
            self.sim.model.geom_name2id(x) for x in self.gripper.right_finger_geoms
        ]
        self.cubeA_geom_id = self.sim.model.geom_name2id("cubeA")
        self.cubeB_geom_id = self.sim.model.geom_name2id("cubeB")
431857
def references(self):
        
        refs = self.items.find('bibrecord/tail/bibliography', ns)
        if refs is not None:
            eids = [r.find("ref-info/refd-itemidlist/itemid", ns).text for r
                    in refs.findall("reference", ns)]
            return ["2-s2.0-" + eid for eid in eids]
        else:
            return None
648893
private List<Reference> copyReferences(List<Reference> references) {
		if (!deepCopyReferences) {
			return Collections.emptyList();
		}

		List<Reference> result = new ArrayList<>(references.size());
		for (Reference reference : references) {
			result.add(dataObjectFactory
					.getReference(copy(reference.getSnakGroups())));
		}
		return result;
	}
53107
def link_reference(self, source, target):
        
        target_uid = api.get_uid(target)
        # get the annotation storage key
        key = self.get_relationship_key(target)
        # get all backreferences from the source
        # N.B. only like this we get the persistent mapping!
        backrefs = get_backreferences(source, relationship=None)
        if key not in backrefs:
            backrefs[key] = PersistentList()
        if target_uid not in backrefs[key]:
            backrefs[key].append(target_uid)
        return True
1078912
def get_ref(self):
        
        _id = self.id
        if _id is None:
            return None
        else:
            return DBRef(self.collection, _id)
783453
def head_ref(self):
        
        return ReferencesDataFrame(self._engine_dataframe.getHEAD(),
                                   self._session, self._implicits)
9829
def _get_all_refs(self, dep, handled_refs=None):
        
        if handled_refs is None:
            handled_refs = [dep]
        else:
            if dep in handled_refs:
                return []
        res = []
        if dep in self.future_values_key_item:
            res.extend(
                self.future_values_key_item[dep]["dependencies"].values())
            add = []
            for h_d in res:
                add.extend(self._get_all_refs(h_d, handled_refs))
            res.extend(add)
        return list(set(res))
936910
def list(self):
        """"""
        connection = self._backend._get_connection()
        return list(self._backend.list(connection))