code: def Completions(component, verbose=False):
      """Gives possible Fire command completions for the component.
  
      A completion is a string that can be appended to a command to continue that
      command. These are used for TAB-completions in Bash for Fire CLIs.
  
      Args:
        component: The component whose completions to list.
        verbose: Whether to include all completions, even private members.
      Returns:
        A list of completions for a command that would so far return the component.
      """
      if inspect.isroutine(component) or inspect.isclass(component):
          spec = inspectutils.GetFullArgSpec(component)
          return _CompletionsFromArgs(spec.args + spec.kwonlyargs)
  
      if isinstance(component, (tuple, list)):
          return [str(index) for index in range(len(component))]
  
      if inspect.isgenerator(component):
          # TODO(dbieber): There are currently no commands available for generators.
          return []
  
      return [
          _FormatForCommand(member_name)
          for member_name, _ in VisibleMembers(
              component, verbose=verbose
          )
      ]
  
file_path: python-fire/fire/completion.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import copy
  import inspect
  from fire import inspectutils
  import six
label_desc: Use image node_id 7 for calling a global function with example usage: Completions(component, verbose) and returns: unknown, _CompletionsFromArgs, unknown, list