parameters: (descend, *expansions)
docstring: Helper function to emit all expansions within an input set.
docstring_summary: Helper function to emit all expansions within an input set.
docstring_tokens: Helper function to emit all expansions within an input set .
function: def emit_expansions(descend, *expansions):
      """Helper function to emit all expansions within an input set."""
      for expansion in expansions:
          yield expansion
  
          if not descend or not isinstance(expansion, list):
              continue
  
          for e, is_func in expansion:
              if is_func:
                  for exp in e.expansions(True):
                      yield exp
              else:
                  yield e
function_tokens: def emit_expansions ( descend , * expansions ) : for expansion in expansions : yield expansion if not descend or not isinstance ( expansion , list ) : continue for e , is_func in expansion : if is_func : for exp in e . expansions ( True ) : yield exp else : yield e