code: def ones_(tensor):
      """Same as `torch.nn.init.ones_`.
      Note:
          - `tensor` should have `infshape` attribute set by `set_base_shapes`.
      """
      assert (
          tensor.infshape.ninf() == 1
      ), "Sampler for (inf, inf) tensors should have mean 0"
  
      def sampler_(tensor, scale=1):
          _no_grad_fill_(tensor, scale)
  
      return constant_std_init_(tensor, sampler_)
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/mup/init.py
imports: import math
  import warnings
  import torch
  from torch.nn.init import _calculate_correct_fan, _calculate_fan_in_and_fan_out, _no_grad_fill_, _no_grad_normal_, _no_grad_uniform_, calculate_gain
label_desc: Use image node_id 4 for calling a global function with example usage: ones_(tensor) and returns: constant_std_init_