code: def extract_statement_from_query_result(self, res):
          
          agent_start, agent_end, affected_start, affected_end = res
  
          # Convert from rdflib literals to python integers so we can use
          # them to index strings
          agent_start = int(agent_start)
          agent_end = int(agent_end)
          affected_start = int(affected_start)
          affected_end = int(affected_end)
  
          # Find the text corresponding to these indices
          agent = self.text[agent_start:agent_end]
          affected = self.text[affected_start:affected_end]
  
          # Strip off surrounding whitespace
          agent = agent.lstrip().rstrip()
          affected = affected.lstrip().rstrip()
  
          # Make an Agent object for both the subject and the object
          subj = Agent(agent, db_refs={'TEXT': agent})
          obj = Agent(affected, db_refs={'TEXT': affected})
  
          statement = Influence(subj=subj, obj=obj)
  
          # Add the statement to the list of statements
          self.statements.append(statement)
docs: Adds a statement based on one element of a rdflib SPARQL query.
  
          Parameters
          ----------
          res: rdflib.query.ResultRow
              Element of rdflib SPARQL query result