code: def repeat(g: jit_utils.GraphContext, self, repeats):
      if not symbolic_helper._is_value(repeats):
          repeats = g.op("Constant", value_t=torch.LongTensor(repeats))
      if symbolic_helper._is_packed_list(repeats):
          repeat_size_len = len(symbolic_helper._unpack_list(repeats))
      else:
          const_repeats = symbolic_helper._maybe_get_const(
              repeats, "is"
          )
          repeat_size_len = len(const_repeats)
      if self.isCompleteTensor():
          sizes = self.type().sizes()
          diff_dims = repeat_size_len - len(sizes)
          if diff_dims > 0:
              self = opset9.view(
                  g,
                  self,
                  g.op(
                      "Constant",
                      value_t=torch.tensor([1] * diff_dims + sizes),
                  ),
              )
      return g.op("Tile", self, repeats)
  
imports: import functools
  import warnings
  import torch
  from torch._C import _onnx
  from torch.onnx import _type_utils, errors, symbolic_helper, symbolic_opset9
  from torch.onnx._internal import jit_utils, registration
label_desc: Use image node_id 24 for calling a global function with example usage: repeat(g, repeats) and returns: g