class_docstr: Supports the same ``get_text*`` methods as ``ASTTokens``,
  but uses the AST to determine the text positions instead of tokens.
  This is faster than ``ASTTokens`` as it requires less setup work.
  
  It also (sometimes) supports nodes inside f-strings, which ``ASTTokens`` doesn't.
  
  Some node types and/or Python versions are not supported.
  In these cases the ``get_text*`` methods will fall back to using ``ASTTokens``
  which incurs the usual setup cost the first time.
  If you want to avoid this, check ``supports_tokenless(node)`` before calling ``get_text*`` methods.
class_docstr_tok: ["Supports","the","same","``","get_text","*","``","methods","as","``","ASTTokens","``",",","but","uses","the","AST","to","determine","the","text","positions","instead","of","tokens",".","This","is","faster","than","``","ASTTokens","``","as","it","requires","less","setup","work",".","It","also","(","sometimes",")","supports","nodes","inside","f-strings",",","which","``","ASTTokens","``","does","n't",".","Some","node","types","and\/or","Python","versions","are","not","supported",".","In","these","cases","the","``","get_text","*","``","methods","will","fall","back","to","using","``","ASTTokens","``","which","incurs","the","usual","setup","cost","the","first","time",".","If","you","want","to","avoid","this",",","check","``","supports_tokenless","(","node",")","``","before","calling","``","get_text","*","``","methods","."]
docstr: Returns two ``(lineno, col_offset)`` tuples for the start and end of the given node.
  If the positions can't be determined, or the nodes don't correspond to any particular text,
  returns ``(1, 0)`` for both.
  
  ``padded`` corresponds to the ``padded`` argument to ``ast.get_source_segment()``.
  This means that if ``padded`` is True, the start position will be adjusted to include
  leading whitespace if ``node`` is a multiline statement.
docstr_tok: ["Returns","two","``","(","lineno",",","col_offset",")","``","tuples","for","the","start","and","end","of","the","given","node",".","If","the","positions","ca","n't","be","determined",",","or","the","nodes","do","n't","correspond","to","any","particular","text",",","returns","``","(","1",",","0",")","``","for","both",".","``","padded","``","corresponds","to","the","``","padded","``","argument","to","``","ast.get_source_segment","(",")","``",".","This","means","that","if","``","padded","``","is","True",",","the","start","position","will","be","adjusted","to","include","leading","whitespace","if","``","node","``","is","a","multiline","statement","."]
code: def get_text_positions(self, node, padded):
      # type: (AstNode, bool) -> Tuple[Tuple[int, int], Tuple[int, int]]
      """
      Returns two ``(lineno, col_offset)`` tuples for the start and end of the given node.
      If the positions can't be determined, or the nodes don't correspond to any particular text,
      returns ``(1, 0)`` for both.
  
      ``padded`` corresponds to the ``padded`` argument to ``ast.get_source_segment()``.
      This means that if ``padded`` is True, the start position will be adjusted to include
      leading whitespace if ``node`` is a multiline statement.
      """
      if getattr(node, "_broken_positions", None):
          # This node was marked in util.annotate_fstring_nodes as having untrustworthy lineno/col_offset.
          return (1, 0), (1, 0)
  
      if supports_tokenless(node):
          return self._get_text_positions_tokenless(node, padded)
  
      return self.asttokens.get_text_positions(node, padded)
  
imports: import abc
  import ast
  import bisect
  import sys
  import token
  from ast import Module
  from typing import Iterable, Iterator, List, Optional, Tuple, Any, cast, TYPE_CHECKING
  import six
  from six.moves import xrange
  from .line_numbers import LineNumbers
  from .util import Token, match_token, is_non_coding_token, patched_generate_tokens, last_stmt, annotate_fstring_nodes, generate_tokens, is_module, is_stmt
label_desc: Use image node_id 5 for calling the ASTText obj's underlying member method code with example usage: obj.get_text_positions(node, padded) and returns: self, int,  int,  int,  int, self