code: def set_flushing_policy(flushing_policy):
      
      if "RAY_USE_NEW_GCS" not in os.environ:
          raise Exception(
              "set_flushing_policy() is only available when environment "
              "variable RAY_USE_NEW_GCS is present at both compile and run time."
          )
      ray.worker.global_worker.check_connected()
      redis_client = ray.worker.global_worker.redis_client
  
      serialized = pickle.dumps(flushing_policy)
      redis_client.set("gcs_flushing_policy", serialized)
docs: Serialize this policy for Monitor to pick up.