code: def ExpandDims(a, dim):
      
      shape = list(a.shape)
      if dim >= 0:
          shape.insert(dim, 1)
      else:
          shape.insert(len(shape) + dim + 1, 1)
      return np.copy(a).reshape(*shape),
docs: Expand dim op, i.e. add singular axis at dim.