code: def _is_on_import_statement(self, offset):
          "Does this offset point to an import statement?"
          data = self.resource.read()
          bol = data.rfind("\n", 0, offset) + 1
          eol = data.find("\n", 0, bol)
          if eol == -1:
              eol = len(data)
          line = data[bol:eol]
          line = line.strip()
          if line.startswith("import ") or line.startswith("from "):
              return True
          else:
              return Falsf _is_on_import_statement(self, offset):
          "Does this offset point to an import statement?"
          data = self.resource.read()
          bol = data.rfind("\n", 0, offset) + 1
          eol = data.find("\n", 0, bol)
          if eol == -1:
              eol = len(data)
          line = data[bol:eol]
          line = line.strip()
          if line.startswith("import ") or line.startswith("from "):
              return True
          else:
              return False
docs: Does this offset point to an import statement?