Store an object in the object store.

    Args:
        value: The Python object to be stored.

    Returns:
        The object ID assigned to this value.

def put(value):
    """Store an object in the object store.

    Args:
        value: The Python object to be stored.

    Returns:
        The object ID assigned to this value.
    """
    worker = global_worker
    worker.check_connected()
    with profiling.profile("ray.put"):
        if worker.mode == LOCAL_MODE:
            # In LOCAL_MODE, ray.put is the identity operation.
            return value
        object_id = ray._raylet.compute_put_id(
            worker.current_task_id,
            worker.task_context.put_index,
        )
        worker.put_object(object_id, value)
        worker.task_context.put_index += 1
        return object_id