code: def use_np_compat(func):
      
      @wraps(func)
      def _with_np_compat(*args, **kwargs):
          with np_compat(active=True):
              return func(*args, **kwargs)
  
      return _with_np_compat
docs: Wraps a function with an activated NumPy-compatibility scope. This ensures
      that the execution of the function is guaranteed with NumPy compatible semantics,
      such as zero-dim and zero size tensors.
  
      Example::
          import mxnet as mx
          @mx.use_np_compat
          def scalar_one():
              return mx.nd.ones(())
          print(scalar_one())
  
      Parameters
      ----------
      func : a user-provided callable function to be scoped by the NumPy compatibility state.
  
      Returns
      -------
      Function
          A function for wrapping the user functions in the NumPy compatibility scope.