code: def _random_data(
      batch_size,
      num_vertices,
      num_channels,
      padding,
      only_self_edges,
      data_type=np.float32,
      neighbors_type=np.float32,
      sizes_type=np.int32,
  ):
      """Create random inputs for feature_steered_convolution."""
  
      def _random_data_2d(padding):
          size = (
              num_vertices
              if not padding
              else np.random.randint(low=1, high=num_vertices + 1)
          )
          data = np.random.uniform(size=(size, num_channels)).astype(
              data_type
          )
          if only_self_edges:
              neighbors = np.eye(size, dtype=neighbors_type)
          else:
              random = np.random.uniform(size=(size, size)).astype(
                  neighbors_type
              )
              neighbors = np.maximum(
                  np.where(
                      random > 0.75,
                      np.ones_like(random),
                      np.zeros_like(random),
                  ),
                  np.eye(size, dtype=neighbors_type),
              )
              neighbors = neighbors / np.sum(
                  neighbors, axis=1, keepdims=True
              )
          if padding:
              data = np.pad(
                  data, ((0, num_vertices - size), (0, 0)), "constant"
              )
              neighbors = np.pad(
                  neighbors,
                  ((0, num_vertices - size), (0, num_vertices - size)),
                  "constant",
              )
              return data, neighbors, size
          else:
              return data, neighbors
  
      if batch_size > 0:
          list_2d = [
              _random_data_2d(padding=padding)
              for _ in range(batch_size)
          ]
          data = np.stack([i[0] for i in list_2d], 0).astype(data_type)
          neighbors = np.stack([i[1] for i in list_2d], 0).astype(
              neighbors_type
          )
          if padding:
              sizes = np.stack([i[2] for i in list_2d], 0).astype(
                  sizes_type
              )
              return data, _dense_to_sparse(neighbors), sizes
          else:
              return data, _dense_to_sparse(neighbors)
      else:
          if padding:
              raise ValueError(
                  "Padding only allowed with batched data."
              )
          data, neighbors = _random_data_2d(padding=False)
          return data.astype(data_type), _dense_to_sparse(
              neighbors.astype(neighbors_type)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  from six.moves import range
  import tensorflow
  import tensorflow_graphics.geometry.convolution.graph_convolution
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 4 for calling a global function with example usage: _random_data(batch_size, num_vertices, num_channels, padding, only__edges, data_type, neighbors_type, sizes_type) and returns: data,  _dense_to_sparse, data,  neighbors,  size, data,  neighbors, data,  _dense_to_sparse,  sizes, data,  _dense_to_sparse