code: def find_line_beginning(strings: Sequence[str],
                          linestart: Optional[str]) -> int:
      
      if linestart is None:  # match an empty line
          for i in range(len(strings)):
              if is_empty_string(strings[i]):
                  return i
          return -1
      for i in range(len(strings)):
          if strings[i].find(linestart) == 0:
              return i
      return -1
docs: Finds the index of the line in ``strings`` that begins with ``linestart``,
      or ``-1`` if none is found.
  
      If ``linestart is None``, match an empty line.