code: def id_by_index(index, resources):
          
          if index < 0 or index >= len(resources):
              return ''
  
          try:
              return resources[index].header_signature
          except AttributeError:
              return resources[index].address
docs: Helper method to fetch the id or address of a resource by its index
  
          Args:
              resources (list of objects): The resources to be paginated
              index (integer): The index of the target resource
  
          Returns:
              str: The address or header_signature of the resource,
                  returns an empty string if not found