code: def cast_conditionally(data: mx.sym.Symbol, dtype: str) -> mx.sym.Symbol:
      
      if dtype != C.DTYPE_FP32:
          return mx.sym.cast(data=data, dtype=dtype)
      return data
docs: Workaround until no-op cast will be fixed in MXNet codebase.
      Creates cast symbol only if dtype is different from default one, i.e. float32.
  
      :param data: Input symbol.
      :param dtype: Target dtype.
      :return: Cast symbol or just data symbol.