Helper function to append two component references to eachother, e.g.
        a "within" component ref and an "object type" component ref.
        :return: New component reference, with other appended to self.
181053
def concatenate(cls, *args: List['ComponentRef']) -> 'ComponentRef':
        

        a = copy.deepcopy(args[0])
        n = a
        for b in args[1:]:
            while n.child:
                n = n.child[0]
            b = copy.deepcopy(b)  # Not strictly necessary
            n.child = [b]
        return a
775257
def add(self, parent, obj_type, **attributes):
        

        return self.ixn.add(parent.obj_ref(), obj_type, *self._get_args_list(**attributes))
21477
def add_child_ref(self, transform_ref):
        
        if not isinstance(transform_ref, TransformRef):
            raise ValueError("transform_ref must be of type TransformRef")

        for child in self.children:
            if child is transform_ref:
                return

        transform_ref.parent = self
        self.children.append(transform_ref)
298010
def merge(self, other, replacements=None):
        

        # TODO: is the current solution not optimal enough?
        for _, item in other._storage.items():  # type: RegionObject
            for so in item.stored_objects:  # type: StoredObject
                if replacements and so.obj in replacements:
                    so = StoredObject(so.start, replacements[so.obj], so.size)
                self._object_mapping[so.obj_id] = so
                self.__store(so, overwrite=False)

        return self
566519
def add_reference(self, subj: Node, val: str) -> None:
        
        match = FHIR_RESOURCE_RE.match(val)
        ref_uri_str = res_type = None
        if match:
            ref_uri_str = val if match.group(FHIR_RE_BASE) else (self._base_uri + urllib.parse.quote(val))
            res_type = match.group(FHIR_RE_RESOURCE)
        elif '://' in val:
            ref_uri_str = val
            res_type = "Resource"
        elif self._base_uri and not val.startswith('#') and not val.startswith('/'):
            ref_uri_str = self._base_uri + urllib.parse.quote(val)
            res_type = val.split('/', 1)[0] if '/' in val else "Resource"
        if ref_uri_str:
            ref_uri = URIRef(ref_uri_str)
            self.add(subj, FHIR.link, ref_uri)
            self.add(ref_uri, RDF.type, FHIR[res_type])
566368
def relative_ref(*parts):
    

    def relative_ref(_value, context, **_params):
        return reference.Relative(*(parts + (context["key"], )))

    return relative_ref
859746
def add(self, child):
        

        if isinstance(child, Include):
            self.add_include(child)
        elif isinstance(child, Dimension):
            self.add_dimension(child)
        elif isinstance(child, Unit):
            self.add_unit(child)
        elif isinstance(child, ComponentType):
            self.add_component_type(child)
        elif isinstance(child, Component):
            self.add_component(child)
        elif isinstance(child, FatComponent):
            self.add_fat_component(child)
        elif isinstance(child, Constant):
            self.add_constant(child)
        else:
            raise ModelError('Unsupported child element')
1180656
def append_child(self, child):
        
        child.parent = self
        self.children.append(child)
        self.changed()
986515
def append(self, *other):
    
    self._data = it.chain(self._data, Stream(*other)._data)
    return self
928060
function (ref, component) {
    var inst = this.getPublicInstance();
    !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
    var publicComponentInstance = component.getPublicInstance();
    if (process.env.NODE_ENV !== 'production') {
      var componentName = component && component.getName ? component.getName() : 'a component';
      process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
    }
    var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
    refs[ref] = publicComponentInstance;
  }
524023
def create_new_reference(self, obj, global_ref=False):
        
        # get an unique address
        opaque_ref = self.state.project.loader.extern_object.allocate()
        # map the object to that address
        l.debug("Map %s to opaque reference 0x%x", obj, opaque_ref)
        if global_ref:
            self.global_refs[opaque_ref] = obj
        else:
            self.local_refs[opaque_ref] = obj
        return opaque_ref
21614
def add_component_definition(self, definition):
        
        # definition.identity = self._to_uri_from_namespace(definition.identity)
        if definition.identity not in self._components.keys():
            self._components[definition.identity] = definition
        else:
            raise ValueError("{} has already been defined".format(definition.identity))
156907
def add_external_reference(self,markable_id, external_ref):
        
        if markable_id in self.idx:
            markable_obj = Cterm(self.idx[markable_id],self.type)
            markable_obj.add_external_reference(external_ref)
        else:
            print('{markable_id} not in self.idx'.format(**locals()))
281270
def add(self, component):
        

        # if already exists, just add the release objects
        old = self.get_component(component.id)
        if old:
            old.releases.extend(component.releases)
            return
        self.components[component.id] = component
503948
def addReferenceSet(self):
        
        self._openRepo()
        name = self._args.name
        filePath = self._getFilePath(self._args.filePath,
                                     self._args.relativePath)
        if name is None:
            name = getNameFromPath(self._args.filePath)
        referenceSet = references.HtslibReferenceSet(name)
        referenceSet.populateFromFile(filePath)
        referenceSet.setDescription(self._args.description)
        if self._args.species is not None:
            referenceSet.setSpeciesFromJson(self._args.species)
        referenceSet.setIsDerived(self._args.isDerived)
        referenceSet.setAssemblyId(self._args.assemblyId)
        referenceSet.setAttributes(json.loads(self._args.attributes))
        sourceAccessions = []
        if self._args.sourceAccessions is not None:
            sourceAccessions = self._args.sourceAccessions.split(",")
        referenceSet.setSourceAccessions(sourceAccessions)
        referenceSet.setSourceUri(self._args.sourceUri)
        self._updateRepo(self._repo.insertReferenceSet, referenceSet)
499067
def merge(self, other):
        
        other.qualify()
        for n in ('name',
                  'qname',
                  'min',
                  'max',
                  'default',
                  'type',
                  'nillable',
                  'form_qualified',):
            if getattr(self, n) is not None:
                continue
            v = getattr(other, n)
            if v is None:
                continue
            setattr(self, n, v)
789783
def append(self, other):
        
        if not isinstance(other,StarPopulation):
            raise TypeError('Only StarPopulation objects can be appended to a StarPopulation.')
        if not np.all(self.stars.columns == other.stars.columns):
            raise ValueError('Two populations must have same columns to combine them.')

        if len(self.constraints) > 0:
            logging.warning('All constraints are cleared when appending another population.')

        self.stars = pd.concat((self.stars, other.stars))

        if self.orbpop is not None and other.orbpop is not None:
            self.orbpop = self.orbpop + other.orbpop