code: def combined_tensor_printing(combined):
      """Set flag controlling whether tensor products of states should be
      printed as a combined bra/ket or as an explicit tensor product of different
      bra/kets. This is a global setting for all TensorProduct class instances.
  
      Parameters
      ----------
      combine : bool
          When true, tensor product states are combined into one ket/bra, and
          when false explicit tensor product notation is used between each
          ket/bra.
      """
      global _combined_printing
      _combined_printing = combined
  
imports: from sympy.core.add import Add
  from sympy.core.expr import Expr
  from sympy.core.mul import Mul
  from sympy.core.power import Pow
  from sympy.core.sympify import sympify
  from sympy.matrices.dense import DenseMatrix
  from sympy.matrices.immutable import ImmutableDenseMatrix
  from sympy.printing.pretty.stringpict import prettyForm
  from sympy.physics.quantum.qexpr import QuantumError
  from sympy.physics.quantum.dagger import Dagger
  from sympy.physics.quantum.commutator import Commutator
  from sympy.physics.quantum.anticommutator import AntiCommutator
  from sympy.physics.quantum.state import Ket, Bra
  from sympy.physics.quantum.matrixutils import numpy_ndarray, scipy_sparse_matrix, matrix_tensor_product
  from sympy.physics.quantum.trace import Tr
label_desc: Use image node_id 1 for calling a global function with example usage: combined_tensor_printing(combined) without return types