code: def _get_squeeze_shape(shape, axis):
      if axis is not None:
          if isinstance(axis, Iterable):
              axis = tuple(axis)
          else:
              axis = (axis,)
  
          for ax in axis:
              if shape[ax] != 1:
                  raise ValueError(
                      "cannot select an axis to squeeze out "
                      "which has size not equal to one"
                  )
          shape = tuple(s for i, s in enumerate(shape) if i not in axis)
      else:
          axis = tuple(i for i, s in enumerate(shape) if s == 1)
          shape = tuple(s for s in shape if s != 1)
  
      return shape, axis
  
file_path: mars/mars/tensor/base/squeeze.py
imports: from collections.abc import Iterable
  from ...serialization.serializables import FieldTypes, KeyField, TupleField
  from ...None import opcodes
  from ..operands import TensorHasInput, TensorOperandMixin
  from ..array_utils import as_same_device, device
label_desc: Use image node_id 1 for calling a global function with example usage: _get_squeeze_shape(shape, axis) and returns: shape,  axis