code: def extract_statements(self):
          
  
          # Look for events that have an AGENT and an AFFECTED, and get the
          # start and ending text indices for each.
          query = prefixes + """
          SELECT
              ?agent_start
              ?agent_end
              ?affected_start
              ?affected_end
          WHERE {
              ?rel role:AGENT ?agent .
              ?rel role:AFFECTED ?affected .
              ?agent lf:start ?agent_start .
              ?agent lf:end ?agent_end .
              ?affected lf:start ?affected_start .
              ?affected lf:end ?affected_end .
          }
          """
          results = self.graph.query(query)
          for res in results:
              # Make a statement for each query match
              self.extract_statement_from_query_result(res)
  
          # Look for events that have an AGENT and a RESULT, and get the start
          # and ending text indices for each.
          query = query.replace('role:AFFECTED', 'role:RESULT')
          results = self.graph.query(query)
          for res in results:
              # Make a statement for each query match
              self.extract_statement_from_query_result(res)
docs: Extracts INDRA statements from the RDF graph via SPARQL queries.