code: def pack_x_y_sample_weight(x, y=None, sample_weight=None):
      """Packs user-provided data into a tuple."""
      if y is None:
          return (x,)
      elif sample_weight is None:
          return (x, y)
      else:
          return (x, y, sample_weight)
  
imports: import collections
  import functools
  import math
  import typing
  import jax
  import jax.numpy
  import numpy
  import six
  import typing_extensions
  from elegy import types, utils
label_desc: Use image node_id 4 for calling a global function with example usage: pack_x_y_sample_weight(x, y, sample_weight) and returns: x, x,  y, x,  y,  sample_weight