Get current link secret label from non-secret storage records; return None for no match.

        :return: latest non-secret storage record for link secret label
971204
async def get_link_secret_label(self) -> str:
        

        LOGGER.debug('Wallet.get_link_secret_label >>>')

        if not self.handle:
            LOGGER.debug('Wallet.get_link_secret <!< Wallet %s is closed', self.name)
            raise WalletState('Wallet {} is closed'.format(self.name))

        rv = None
        records = await self.get_non_secret(TYPE_LINK_SECRET_LABEL)
        if records:
            rv = records[str(max(int(k) for k in records))].value  # str to int, max, and back again

        LOGGER.debug('Wallet.get_link_secret_label <<< %s', rv)
        return rv
691630
def get_first_non_label_instruction(self):
        
        for i in range(len(self)):
            if not self.mem[i].is_label:
                return self.mem[i]

        return None
184057
def get_last_modified_date(*args, **kwargs):
    
    try:
        latest_note = Note.objects.latest()
        latest_release = Release.objects.latest()
    except ObjectDoesNotExist:
        return None

    return max(latest_note.modified, latest_release.modified)
717174
def next(self):
        
        if self._current < len(self._record_list):
            rec = self._record_list[self._current]
            key = rec['name']
            self._current += 1
            return key
        else:
            raise StopIteration
1165653
def get_data_link(self, instance, link):
        
        response = self.get_proto('/links/{}/{}'.format(instance, link))
        message = yamcsManagement_pb2.LinkInfo()
        message.ParseFromString(response.content)
        return Link(message)
751136
def cert_pair(self):
        
        if self._ssl_cert and self._ssl_private_key:
            return (self._ssl_cert, self._ssl_private_key)
        else:
            return None
91416
def _get_next_all_link_record(self):
        """"""
        _LOGGER.debug("Starting: _get_next_all_link_record")
        _LOGGER.debug("Requesting Next All-Link Record")
        msg = GetNextAllLinkRecord()
        self.send_msg(msg, wait_nak=True, wait_timeout=.5)
        _LOGGER.debug("Ending: _get_next_all_link_record")
522808
def GetLinkedFileEntry(self):
    
    link = self._GetLink()
    if not link:
      return None

    # TODO: is there a way to determine the identifier here?
    link_identifier = None

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    path_spec = apfs_path_spec.APFSPathSpec(
        location=link, parent=parent_path_spec)

    is_root = bool(
        link == self._file_system.LOCATION_ROOT or
        link_identifier == self._file_system.ROOT_DIRECTORY_IDENTIFIER)

    return APFSFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root)
484874
def current_revision(self):
        
        if self.current_index is None:
            return None

        if len(self.revisions) > self.current_index:
            return self.revisions[self.current_index]

        return None
526388
def label(self):
        
        if len(self.name) > 14 and '.' in self.name:
            return '\\.\\n'.join(self.name.split('.'))  # pragma: nocover
        return self.name
740396
def get_label(self, queryset, query_data):
        
        if query_data.get('label', False):
            return query_data['label']

        try:
            return queryset.model.__name__
        except AttributeError:
            return query_data['queryset'].model.__name__
1366583
def get_full_current_object(arn, current_model):
    
    LOG.debug(f'[-->] Item with ARN: {arn} was too big for SNS -- fetching it from the Current table...')
    item = list(current_model.query(arn))

    # If for whatever reason, the item *cannot* be found, then this record should be skipped over.
    # This will happen if this event came in and got processed right after the item was deleted
    # from the Current table. If so, then do nothing -- the deletion event will be processed later.
    if not item:
        return None

    # We need to place the real configuration data into the record so it can be deserialized into
    # the current model correctly:
    return item[0]
690103
def get_label(self):
        
        if self.label is None:
            self.label = self.get_field('label')
        return self.label
1085834
def get_wrapped_instance(self, instance=None):
        
        if instance._meta.label_lower not in self.registry:
            raise ModelNotRegistered(f"{repr(instance)} is not registered with {self}.")
        wrapper_cls = self.registry.get(instance._meta.label_lower) or self.wrapper_cls
        if wrapper_cls:
            return wrapper_cls(instance)
        return instance
1251434
def _GetLink(self):
    
    if self._link is None:
      if self._tar_info:
        self._link = self._tar_info.linkname

    return self._link
757154
def GetLinkedFileEntry(self):
    
    link = self._GetLink()
    if not link:
      return None

    # TODO: is there a way to determine the MFT entry here?
    link_mft_entry = None

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    path_spec = ntfs_path_spec.NTFSPathSpec(
        location=link, parent=parent_path_spec)

    is_root = bool(
        link == self._file_system.LOCATION_ROOT or
        link_mft_entry == self._file_system.MFT_ENTRY_ROOT_DIRECTORY)

    return NTFSFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root)
10532
def GetLinkedFileEntry(self):
    
    link = self._GetLink()
    if not link:
      return None

    # TODO: is there a way to determine the link inode number here?
    link_inode = None

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    path_spec = tsk_path_spec.TSKPathSpec(
        location=link, parent=parent_path_spec)

    root_inode = self._file_system.GetRootInode()
    is_root = bool(
        link == self._file_system.LOCATION_ROOT or (
            link_inode is not None and root_inode is not None and
            link_inode == root_inode))

    return TSKFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root)