code: def broadcast_arrays(
      *arrays: Union[tf.Tensor, tf.Variable],
  ) -> List[Union[tf.Tensor, tf.Variable]]:
      if len(arrays) > 1:
          try:
              desired_shape = tf.broadcast_dynamic_shape(
                  arrays[0].shape, arrays[1].shape
              )
          except tf.errors.InvalidArgumentError as e:
              raise ivy.utils.exceptions.IvyBroadcastShapeError(
                  e
              ) from e
          if len(arrays) > 2:
              for i in range(2, len(arrays)):
                  try:
                      desired_shape = tf.broadcast_dynamic_shape(
                          desired_shape, arrays[i].shape
                      )
                  except tf.errors.InvalidArgumentError as e:
                      raise ivy.utils.exceptions.IvyBroadcastShapeError(
                          e
                      ) from e
      else:
          return [arrays[0]]
      result = []
      for tensor in arrays:
          result.append(tf.broadcast_to(tensor, desired_shape))
  
      return result
  
imports: from typing import Optional, Union, Sequence, List
  import numpy
  import tensorflow
  from tensorflow.python.framework.dtypes import DType
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
  from .None import backend_version
label_desc: Use image node_id 2 for calling a global function with example usage: broadcast_arrays() and returns: result, list