code: def get_soft_shape_labels(sdfs):
      """Get soft shape labels."""
      num_shapes = sdfs.shape[0]
      pointcloud_distances = np.zeros([num_shapes, num_shapes])
  
      for i in range(num_shapes):
          for j in range(i + 1, num_shapes):
              dist = np.mean((sdfs[i] - sdfs[j]) ** 2)
              pointcloud_distances[i, j] = dist
  
      pc_distances = pointcloud_distances + pointcloud_distances.T
      soft_shape_labels = tf.cast(
          tf.math.less(
              pc_distances, FLAGS.soft_shape_labels_a + 0.00001
          ),
          dtype=tf.float32,
      )
      soft_shape_labels = tf.maximum(
          1 - (pc_distances * FLAGS.soft_shape_labels_a) ** 2, 0.0
      )
  
      return soft_shape_labels
  
imports: import os
  import pickle
  import time
  from absl import app
  from absl import flags
  from absl import logging
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorflow_graphics.projects.points_to_3Dobjects.data_preparation.extract_protos
  from tensorflow_graphics.projects.points_to_3Dobjects.losses import collision_loss
  from tensorflow_graphics.projects.points_to_3Dobjects.losses import cross_entropy_loss
  from tensorflow_graphics.projects.points_to_3Dobjects.losses import focal_loss
  from tensorflow_graphics.projects.points_to_3Dobjects.losses import focal_loss_sparse
  from tensorflow_graphics.projects.points_to_3Dobjects.losses import learning_rate_schedule
  from tensorflow_graphics.projects.points_to_3Dobjects.losses import regression_huber_loss
  from tensorflow_graphics.projects.points_to_3Dobjects.losses import regression_l1_loss
  import tensorflow_graphics.projects.points_to_3Dobjects.models.centernet_vid
  from tensorflow_graphics.projects.points_to_3Dobjects.transforms import transforms_factory
  from tensorflow_graphics.projects.points_to_3Dobjects.utils import evaluator
  import tensorflow_graphics.projects.points_to_3Dobjects.utils.io
  import tensorflow_graphics.projects.points_to_3Dobjects.utils.logger
  import tensorflow_graphics.projects.points_to_3Dobjects.utils.plot
  import tensorflow_graphics.projects.points_to_3Dobjects.utils.tf_utils
  from google3.pyglib import gfile
label_desc: Use image node_id 2 for calling a global function with example usage: get_soft_shape_labels(sdfs) and returns: soft_shape_labels