This interface is used to get a DDO object in the from of dict.

        :param ont_id: the unique ID for identity.
        :return: a description object of ONT ID in the from of dict.
328768
def get_ddo(self, ont_id: str) -> dict:
        
        args = dict(ontid=ont_id.encode('utf-8'))
        invoke_code = build_vm.build_native_invoke_code(self.__contract_address, self.__version, 'getDDO', args)
        unix_time_now = int(time())
        tx = Transaction(0, 0xd1, unix_time_now, 0, 0, None, invoke_code, bytearray(), [])
        response = self.__sdk.rpc.send_raw_transaction_pre_exec(tx)
        ddo = OntId.parse_ddo(ont_id, response['Result'])
        return ddo
539674
def get_trust_id(self):
        
        # Implemented from template for osid.resource.Resource.get_avatar_id_template
        if not bool(self._my_map['trustId']):
            raise errors.IllegalState('this Authorization has no trust')
        else:
            return Id(self._my_map['trustId'])
386731
def get_router_id(self, tenant_id, tenant_name):
        
        router_id = None
        if tenant_id in self.tenant_dict:
            router_id = self.tenant_dict.get(tenant_id).get('router_id')
        if not router_id:
            router_list = self.os_helper.get_rtr_by_name(
                'FW_RTR_' + tenant_name)
            if len(router_list) > 0:
                router_id = router_list[0].get('id')
        return router_id
926500
def get(self, oid):
        
        try:
            results = self.cmd_gen.getCmd(self._get_auth(),
                                          self._get_transport(),
                                          oid)
        except snmp_error.PySnmpError as e:
            raise SNMPFailure(SNMP_FAILURE_MSG % ("GET", e))

        error_indication, error_status, error_index, var_binds = results

        if error_indication:
            # SNMP engine-level error.
            raise SNMPFailure(SNMP_FAILURE_MSG % ("GET", error_indication))

        if error_status:
            # SNMP PDU error.
            raise SNMPFailure(
                "SNMP operation '%(operation)s' failed: %(error)s at"
                " %(index)s" %
                {'operation': "GET", 'error': error_status.prettyPrint(),
                 'index':
                     error_index and var_binds[int(error_index) - 1]
                     or '?'})

        # We only expect a single value back
        name, val = var_binds[0]
        return val
92043
def usable_id(cls, id):
        
        try:
            # id is maybe a hostname
            qry_id = cls.from_name(id)
            if not qry_id:
                # id is maybe an ip
                qry_id = cls.from_ip(id)
            if not qry_id:
                qry_id = cls.from_vhost(id)
        except Exception:
            qry_id = None

        if not qry_id:
            msg = 'unknown identifier %s' % id
            cls.error(msg)

        return qry_id
290509
def getConId(self, contract_identifier):
        
        details = self.contractDetails(contract_identifier)
        if len(details["contracts"]) > 1:
            return details["m_underConId"]
        return details["m_summary"]["m_conId"]
999887
def get(self, obj_id):
        
        response = self._client.session.get(
            '{url}/{id}'.format(
                url=self.endpoint_url, id=obj_id
            )
        )
        return self.process_response(response)
561760
def client_id_from_id_token(id_token):
    
    payload = JWT().unpack(id_token).payload()
    aud = payload.get('aud', None)
    if aud is None:
        return None
    if isinstance(aud, list):
        return aud[0]
    return aud
1286037
def get_identity(identity):
    
    if isinstance(identity, AnonymousUser):
        return identity, None

    if isinstance(identity, get_user_model()):
        return identity, None
    elif isinstance(identity, Group):
        return None, identity
    else:  # pragma: no cover
        raise NotUserNorGroup(
            'User/AnonymousUser or Group instance is required '
            '(got {})'.format(identity),
        )
635250
def as_a_dict(self):
        
        index_dict = {
            'ddoc': self._ddoc_id,
            'name': self._name,
            'type': self._type,
            'def': self._def
        }

        if self._partitioned:
            index_dict['partitioned'] = True

        return index_dict
586889
def get_id(brain_or_object):
    
    if is_brain(brain_or_object) and base_hasattr(brain_or_object, "getId"):
        return brain_or_object.getId
    return get_object(brain_or_object).getId()
38407
def get(self, id):
        
        id = self.as_id(id)
        url = '%s/%s' % (self, id)
        response = self.http.get(url, auth=self.auth)
        response.raise_for_status()
        return response.json()
389603
def _get_persistent_id(self, o):
        
        if type(o) in self.hash_dedup:
            oid = o.__class__.__name__ + "-" + str(hash(o))
            self._object_cache[oid] = o
            return oid

        if any(isinstance(o,c) for c in self.unsafe_key_baseclasses):
            return None

        try:
            return self._uuid_cache[o]
        except KeyError:
            pass
        except TypeError:
            return None

        #if type(o) in self.uuid_dedup:
        #    return self._get_id(o)
        if o.__class__.__module__.split('.')[0] in self.module_dedup or o.__class__ in self.uuid_dedup:
            oid = o.__class__.__name__.split(".")[-1] + '-' + str(uuid.uuid4())
            self._object_cache[oid] = o
            self._uuid_cache[o] = oid
            return oid

        return None
141989
def get_avatar_id(self):
        
        # Implemented from template for osid.resource.Resource.get_avatar_id_template
        if not bool(self._my_map['avatarId']):
            raise errors.IllegalState('this Resource has no avatar')
        else:
            return Id(self._my_map['avatarId'])
143481
def by_id(self, region, encrypted_summoner_id):
        
        url, query = SummonerApiV4Urls.by_id(
            region=region, encrypted_summoner_id=encrypted_summoner_id
        )
        return self._raw_request(self.by_id.__name__, region, url, query)
547201
def t_ID(self, t):
        '
        res = self.oper.get(t.value, None)  # Check for reserved words
        if res is None:
            res = t.value.upper()
            if res == 'FALSE':
                t.type = 'BOOL'
                t.value = False
            elif res == 'TRUE':
                t.type = 'BOOL'
                t.value = True
            else:
                t.type = 'ID'
        else:
            t.value = res
            t.type = 'FUNCTION'
        return t
837749
def getOperationNameForId(i):
    
    for key in operations:
        if int(operations[key]) is int(i):
            return key
    return "Unknown Operation ID %d" % i