Returns IRI, or blank node curie/iri depending on
        self.skolemize_blank_node setting

        :param curie: str id as curie or iri
        :return:
4641
def _getnode(self, curie):
        
        if re.match(r'^_:', curie):
            if self.are_bnodes_skized is True:
                node = self.skolemizeBlankNode(curie)
            else:
                node = curie
        elif re.match(r'^http|^ftp', curie):
            node = curie
        elif len(curie.split(':')) == 2:
            node = StreamedGraph.curie_util.get_uri(curie)
        else:
            raise TypeError("Cannot process curie {}".format(curie))
        return node
93225
def IOR(type, nr, size):
    
    return IOC(IOC_READ, type, nr, IOC_TYPECHECK(size))
654140
def get_direct_band_gap_dict(self):
        
        if self.is_metal():
            raise ValueError("get_direct_band_gap_dict should"
                             "only be used with non-metals")
        direct_gap_dict = {}
        for spin, v in self.bands.items():
            above = v[np.all(v > self.efermi, axis=1)]
            min_above = np.min(above, axis=0)
            below = v[np.all(v < self.efermi, axis=1)]
            max_below = np.max(below, axis=0)
            diff = min_above - max_below
            kpoint_index = np.argmin(diff)
            band_indices = [np.argmax(below[:, kpoint_index]),
                            np.argmin(above[:, kpoint_index]) + len(below)]
            direct_gap_dict[spin] = {"value": diff[kpoint_index],
                                     "kpoint_index": kpoint_index,
                                     "band_indices": band_indices}
        return direct_gap_dict
310791
def getOntoCategory(curie, alwaysFetch=False):
    
    
    fileName = os.path.join(os.path.dirname(__file__), "ontoCategories.bin") 
    if not alwaysFetch:
        try:
            with open(fileName, "rb") as catFile:
                ontoCat = pickle.load(catFile)
                
            if curie in ontoCat:
                return ontoCat[curie]                
        except:
            ontoCat = {}
    
    base = bases["KS"] 
    query = base + "/vocabulary/id/" + curie
    response = requests.get(query)
    if not response.ok:
        ontoCat[curie] = []
    else:

        try:
            concepts = response.json()
        except ValueError:
            print(query)
            print(response)
            raise
        
        if len(concepts["categories"]):
            ontoCat[curie] = concepts["categories"]
        else:
            ontoCat[curie] = []


    try:
        with open(fileName, "wb") as catFile:
            pickle.dump(ontoCat, catFile)
    except:
        pass        

    return ontoCat[curie]
827515
def get(self, node_id):
        
        return \
            self._nodes[_node.Root.ID].get(node_id) or \
            self._nodes[_node.Root.ID].get(self._sid_map.get(node_id))
733679
def i2s_frameid(x):
    
    try:
        return PNIO_FRAME_IDS[x]
    except KeyError:
        pass
    if 0x0100 <= x < 0x1000:
        return "RT_CLASS_3 (%4x)" % x
    if 0x8000 <= x < 0xC000:
        return "RT_CLASS_1 (%4x)" % x
    if 0xC000 <= x < 0xFC00:
        return "RT_CLASS_UDP (%4x)" % x
    if 0xFF80 <= x < 0xFF90:
        return "FragmentationFrameID (%4x)" % x
    return x
1029057
def add_curie(self, name, href):
        
        self.draft.set_curie(self, name, href)
        return self
746987
def get_random_node(graph,
                    node_blacklist: Set[BaseEntity],
                    invert_degrees: Optional[bool] = None,
                    ) -> Optional[BaseEntity]:
    
    try:
        nodes, degrees = zip(*(
            (node, degree)
            for node, degree in sorted(graph.degree(), key=itemgetter(1))
            if node not in node_blacklist
        ))
    except ValueError:  # something wrong with graph, probably no elements in graph.degree_iter
        return

    if invert_degrees is None or invert_degrees:
        # More likely to choose low degree nodes to explore, so don't make hubs
        degrees = [1 / degree for degree in degrees]

    wrg = WeightedRandomGenerator(nodes, degrees)
    return wrg.next()
1358335
def blank_stim(self,type=None,fill=0):
        ''''''
        blank = copy.copy(self)
        blank.name = 'Blank'
        if type==None:
            type = self.type()
        if type=="column":
            num_reps = self.reps
            if num_reps==None:
                if self.type()=="column":
                    self.read_file()
                    num_reps = len(self.column)
                else:
                    nl.notify('Error: requested to return a blank column, but I can\'t figure out how many reps to make it!',level=nl.level.error)
            blank.column = [fill]*num_reps
            return blank
        if type=="times":
            blank.times = []
            return blank
70457
def bnode_id(self):
        
        if self.subject.type != 'bnode':
            return self.subject
        rtn_list = []
        for prop in sorted(self):
            for value in sorted(self[prop]):
                rtn_list.append("%s%s" % (prop, value))
        return sha1("".join(rtn_list).encode()).hexdigest()
1216325
public static boolean isAnonymousNodeIRI(IRI iri) {
        return iri != null && iri.getNamespace().startsWith(PREFIX) && iri.getNamespace().contains(NODE_ID_PREFIX);
    }
203635
public static HalLinkRelation curied(String curie, String rel) {

		Assert.hasText(curie, "Curie must not be null or empty!");

		return new HalLinkRelation(curie, rel);
	}
313046
def shapeRef_to_iriref(self, ref: ShExDocParser.ShapeRefContext) -> ShExJ.IRIREF:
        
        if ref.ATPNAME_NS():
            return ShExJ.IRIREF(self._lookup_prefix(ref.ATPNAME_NS().getText()[1:]))
        elif ref.ATPNAME_LN():
            prefix, local = ref.ATPNAME_LN().getText()[1:].split(':', 1)
            return ShExJ.IRIREF(self._lookup_prefix(prefix + ':') + (local if local else ""))
        else:
            return self.shapeexprlabel_to_IRI(ref.shapeExprLabel())
1140388
def get(self, node_id):
        
        if (self._registry[node_id].monotonic_timestamp + self.TIMEOUT) < time.monotonic():
            self._call_event_handlers(self.UpdateEvent(self._registry[node_id],
                                                       self.UpdateEvent.EVENT_ID_OFFLINE))
            del self._registry[node_id]
        return self._registry[node_id]
366354
def visitIriRange(self, ctx: ShExDocParser.IriRangeContext):
        
        baseiri = self.context.iri_to_iriref(ctx.iri())
        if not ctx.STEM_MARK():
            vsvalue = baseiri                   # valueSetValue = objectValue  / objectValue = IRI
        else:
            if ctx.iriExclusion():              # valueSetValue = IriStemRange / iriStemRange = stem + exclusions
                vsvalue = IriStemRange(baseiri, exclusions=[])
                self._iri_exclusions(vsvalue, ctx.iriExclusion())
            else:
                vsvalue = IriStem(baseiri)      # valueSetValue = IriStem  /  IriStem: {stem:IRI}
        self.nodeconstraint.values.append(vsvalue)
112897
def _get_intf_rb_id(rbridge_id):
        

        intf_rb_id = ET.Element(
            'get-ip-interface',
            xmlns="urn:brocade.com:mgmt:brocade-interface-ext"
        )
        if rbridge_id is not None:
            rbridge_el = ET.SubElement(intf_rb_id, "rbridge-id")
            rbridge_el.text = rbridge_id

        return intf_rb_id
1210604
@Override
	public Collection<? extends Object> getCurieInformation(Links links) {

		return curies.entrySet().stream() //
				.map(it -> new Curie(it.getKey(), getCurieHref(it.getKey(), it.getValue()))) //
				.collect(Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableCollection));
	}