code: def get_line_indent(token):
      
      start = token.start_mark.buffer.rfind('\n', 0,
                                            token.start_mark.pointer) + 1
      content = start
      while token.start_mark.buffer[content] == ' ':
          content += 1
      return content - start
docs: Finds the indent of the line the token starts in.