code: def get_service_address(
              self,
              block_identifier: BlockSpecification,
              index: int,
      ) -> Optional[AddressHex]:
          
          try:
              result = self.proxy.contract.functions.service_addresses(index).call(
                  block_identifier=block_identifier,
              )
          except web3.exceptions.BadFunctionCallOutput:
              result = None
          return result
docs: Gets the address of a service by index. If index is out of range return None