code: def register_gym_env(class_entry_point, version="v0", kwargs=None):
      """Registers the class in Gym and returns the registered name and the env."""
  
      split_on_colon = class_entry_point.split(":")
      assert len(split_on_colon) == 2
  
      class_name = split_on_colon[1]
      # We have to add the version to conform to gym's API.
      env_name = "T2TEnv-{}-{}".format(class_name, version)
      gym.envs.register(
          id=env_name, entry_point=class_entry_point, kwargs=kwargs
      )
  
      logging.info(
          "Entry Point [%s] registered with id [%s]",
          class_entry_point,
          env_name,
      )
  
      return env_name, gym.make(env_name)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  from absl import logging
  import gym
  import gym.wrappers
  import numpy
  from PIL import Image
label_desc: Use image node_id 4 for calling a global function with example usage: register_gym_env(class_entry_point, version, kwargs) and returns: env_name,  gym