code: def var(names, **args):
      """
      Create symbols and inject them into the global namespace.
  
      Explanation
      ===========
  
      This calls :func:`symbols` with the same arguments and puts the results
      into the *global* namespace. It's recommended not to use :func:`var` in
      library code, where :func:`symbols` has to be used::
  
      Examples
      ========
  
      >>> from sympy import var
  
      >>> var('x')
      x
      >>> x # noqa: F821
      x
  
      >>> var('a,ab,abc')
      (a, ab, abc)
      >>> abc # noqa: F821
      abc
  
      >>> var('x,y', real=True)
      (x, y)
      >>> x.is_real and y.is_real # noqa: F821
      True
  
      See :func:`symbols` documentation for more details on what kinds of
      arguments can be passed to :func:`var`.
  
      """
  
      def traverse(symbols, frame):
          """Recursively inject symbols to the global namespace."""
          for symbol in symbols:
              if isinstance(symbol, Basic):
                  frame.f_globals[symbol.name] = symbol
              elif isinstance(symbol, FunctionClass):
                  frame.f_globals[symbol.__name__] = symbol
              else:
                  traverse(symbol, frame)
  
      from inspect import currentframe
  
      frame = currentframe().f_back
  
      try:
          syms = symbols(names, **args)
  
          if syms is not None:
              if isinstance(syms, Basic):
                  frame.f_globals[syms.name] = syms
              elif isinstance(syms, FunctionClass):
                  frame.f_globals[syms.__name__] = syms
              else:
                  traverse(syms, frame)
      finally:
          del frame  # break cyclic dependencies as stated in inspect docs
  
      return syms
  
imports: from __future__ import annotations
  from .assumptions import StdFactKB, _assume_defined
  from .basic import Basic, Atom
  from .cache import cacheit
  from .containers import Tuple
  from .expr import Expr, AtomicExpr
  from .function import AppliedUndef, FunctionClass
  from .kind import NumberKind, UndefinedKind
  from .logic import fuzzy_bool
  from .singleton import S
  from .sorting import ordered
  from .sympify import sympify
  from sympy.logic.boolalg import Boolean
  from sympy.utilities.iterables import sift, is_sequence
  from sympy.utilities.misc import filldedent
  import string
  import re
  import random
  from itertools import product
  from typing import Any
label_desc: Use image node_id 5 for calling a global function with example usage: var(names) and returns: syms