code: def extract_type_tens(expression, component):
      """
      Extract from a ``TensExpr`` all tensors with `component`.
  
      Returns two tensor expressions:
  
      * the first contains all ``Tensor`` of having `component`.
      * the second contains all remaining.
  
  
      """
      if isinstance(expression, Tensor):
          sp = [expression]
      elif isinstance(expression, TensMul):
          sp = expression.args
      else:
          raise ValueError("wrong type")
  
      # Collect all gamma matrices of the same dimension
      new_expr = S.One
      residual_expr = S.One
      for i in sp:
          if isinstance(i, Tensor) and i.component == component:
              new_expr *= i
          else:
              residual_expr *= i
      return new_expr, residual_expr
  
file_path: sympy/sympy/physics/hep/gamma_matrices.py
imports: from sympy.core.mul import Mul
  from sympy.core.singleton import S
  from sympy.matrices.dense import eye
  from sympy.matrices.expressions.trace import trace
  from sympy.tensor.tensor import TensorIndexType, TensorIndex, TensMul, TensAdd, tensor_mul, Tensor, TensorHead, TensorSymmetry
label_desc: Use image node_id 1 for calling a global function with example usage: extract_type_tens(expression, component) and returns: new_expr,  residual_expr