code: def get(
      cls, initialize: bool = True
  ) -> Optional["RayOnSparkContext"]:
      if RayOnSparkContext._active_ray_context:
          ray_ctx = RayOnSparkContext._active_ray_context
          if initialize and not ray_ctx.initialized:
              ray_ctx.init()
          return ray_ctx
      else:
          invalidInputError(
              False,
              "No active RayOnSparkContext. "
              "Please create a RayOnSparkContext and init it first",
          )
      return None
  
imports: import os
  import re
  import subprocess
  import time
  import uuid
  import random
  import warnings
  import tempfile
  import filelock
  import multiprocessing
  from packaging import version
  from bigdl.orca.ray.process import session_execute, ProcessMonitor
  from bigdl.orca.ray.utils import is_local
  from bigdl.orca.ray.utils import resource_to_bytes
  from bigdl.orca.ray.utils import get_parent_pid
  from bigdl.dllib.utils.log4Error import invalidInputError
  from typing import TYPE_CHECKING
  from typing import Any, Dict, Optional, List
label_desc: Use image node_id 3 for calling the RayOnSparkContext obj's underlying member method code with example usage: obj.get(cls, initialize) and returns: None, ray_ctx