parameters: (
          self,
          sub: str,
          in_current_line: bool = False,
          ignore_case: bool = False,
          count: int = 1,
      )
return_statement: return None
docstring: Find `text` before the cursor, return position relative to the cursor
          position. Return `None` if nothing was found.
  
          :param count: Find the n-th occurrence.
docstring_summary: Find `text` before the cursor, return position relative to the cursor
          position. Return `None` if nothing was found.
docstring_tokens: Find text before the cursor return position relative to the cursor position . Return None if nothing was found .
function: def find_backwards(
          self,
          sub: str,
          in_current_line: bool = False,
          ignore_case: bool = False,
          count: int = 1,
      ) -> Optional[int]:
          """
          Find `text` before the cursor, return position relative to the cursor
          position. Return `None` if nothing was found.
  
          :param count: Find the n-th occurrence.
          """
          if in_current_line:
              before_cursor = self.current_line_before_cursor[::-1]
          else:
              before_cursor = self.text_before_cursor[::-1]
  
          flags = re.IGNORECASE if ignore_case else 0
          iterator = re.finditer(re.escape(sub[::-1]), before_cursor, flags)
  
          try:
              for i, match in enumerate(iterator):
                  if i + 1 == count:
                      return -match.start(0) - len(sub)
          except StopIteration:
              pass
          return None
function_tokens: def find_backwards ( self , sub : str , in_current_line : bool = False , ignore_case : bool = False , count : int = 1 , ) -> Optional [ int ] : if in_current_line : before_cursor = self . current_line_before_cursor [ : : - 1 ] else : before_cursor = self . text_before_cursor [ : : - 1 ] flags = re . IGNORECASE if ignore_case else 0 iterator = re . finditer ( re . escape ( sub [ : : - 1 ] ) , before_cursor , flags ) try : for i , match in enumerate ( iterator ) : if i + 1 == count : return - match . start ( 0 ) - len ( sub ) except StopIteration : pass return None