code: def distribute(x):
      """Control automatic distribution of Number over Add
  
      Explanation
      ===========
  
      This context manager controls whether or not Mul distribute Number over
      Add. Plan is to avoid distributing Number over Add in all of sympy. Once
      that is done, this contextmanager will be removed.
  
      Examples
      ========
  
      >>> from sympy.abc import x
      >>> from sympy.core.parameters import distribute
      >>> print(2*(x + 1))
      2*x + 2
      >>> with distribute(False):
      ...     print(2*(x + 1))
      2*(x + 1)
      """
  
      old = global_parameters.distribute
  
      try:
          global_parameters.distribute = x
          yield
      finally:
          global_parameters.distribute = old
  
file_path: sympy/sympy/core/parameters.py
imports: from .cache import clear_cache
  from contextlib import contextmanager
  from threading import local
label_desc: Use image node_id 1 for calling a global function with example usage: distribute(x) without return types