code: def settings_get(self, block_id, settings):
          '''Returns a list of key/value pairs (str, str).'''
  
          block = self._get_blocks([block_id.hex()])[0]
  
          block_header = BlockHeader()
          block_header.ParseFromString(block.header)
  
          try:
              settings_view = self._settings_view_factory.create_settings_view(
                  block_header.state_root_hash)
          except KeyError:
              LOGGER.error(
                  'Settings from block %s requested, but root hash %s was '
                  'missing. Returning no setting values.',
                  block_id.hex(),
                  block_header.state_root_hash)
              # The state root does not exist, which may indicate a pruned root
              # from a dropped fork or an invalid state.
              return []
  
          result = []
          for setting in settings:
              try:
                  value = settings_view.get_setting(setting)
              except KeyError:
                  # if the key is missing, leave it out of the response
                  continue
  
              result.append((setting, value))
  
          return resulf settings_get(self, block_id, settings):
          '''Returns a list of key/value pairs (str, str).'''
  
          block = self._get_blocks([block_id.hex()])[0]
  
          block_header = BlockHeader()
          block_header.ParseFromString(block.header)
  
          try:
              settings_view = self._settings_view_factory.create_settings_view(
                  block_header.state_root_hash)
          except KeyError:
              LOGGER.error(
                  'Settings from block %s requested, but root hash %s was '
                  'missing. Returning no setting values.',
                  block_id.hex(),
                  block_header.state_root_hash)
              # The state root does not exist, which may indicate a pruned root
              # from a dropped fork or an invalid state.
              return []
  
          result = []
          for setting in settings:
              try:
                  value = settings_view.get_setting(setting)
              except KeyError:
                  # if the key is missing, leave it out of the response
                  continue
  
              result.append((setting, value))
  
          return result
docs: Returns a list of key/value pairs (str, str).