docstr: Return the next possible completion for 'text'.
  
  This is called successively with state == 0, 1, 2, ... until it
  returns None.  The completion should begin with 'text'.
docstr_tok: ["Return","the","next","possible","completion","for","'text","'",".","This","is","called","successively","with","state","==","0",",","1",",","2",",","...","until","it","returns","None",".","The","completion","should","begin","with","'text","'","."]
code: def complete(self, text, state):
      """Return the next possible completion for 'text'.
  
      This is called successively with state == 0, 1, 2, ... until it
      returns None.  The completion should begin with 'text'.
  
      """
      if self.use_main_ns:
          self.namespace = __main__.__dict__
  
      if not text.strip():
          if state == 0:
              if _readline_available:
                  readline.insert_text("\t")
                  readline.redisplay()
                  return ""
              else:
                  return "\t"
          else:
              return None
  
      if state == 0:
          if "." in text:
              self.matches = self.attr_matches(text)
          else:
              self.matches = self.global_matches(text)
      try:
          return self.matches[state]
      except IndexError:
          return None
  
file_path: catboost/contrib/tools/python3/src/Lib/rlcompleter.py
imports: import atexit
  import builtins
  import inspect
  import keyword
  import re
  import __main__
label_desc: Use image node_id 2 for calling the Completer obj's underlying member method code with example usage: obj.complete(text, state) and returns: self, None, None, str, str