code: def floats_tensor(shape, scale=1.0, rng=None, name=None):
      """Creates a random float32 tensor"""
      if rng is None:
          rng = random.Random()
  
      total_dims = 1
      for dim in shape:
          total_dims *= dim
  
      values = []
      for _ in range(total_dims):
          values.append(rng.random() * scale)
  
      return np.array(values, dtype=jnp.float32).reshape(shape)
  
imports: import copy
  import inspect
  import json
  import random
  import tempfile
  from typing import List, Tuple
  import numpy
  import transformers
  from transformers import is_flax_available, is_torch_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import CaptureLogger, is_pt_flax_cross_test, require_flax, torch_device
  from transformers.utils import CONFIG_NAME, GENERATION_CONFIG_NAME, logging
  from transformers.utils.generic import ModelOutput
label_desc: Use image node_id 2 for calling a global function with example usage: floats_tensor(shape, scale, rng, name) and returns: np