code: def _update_group_membership(
      worker_info, my_devices, reverse_device_map, is_join
  ):
      agent = cast(TensorPipeAgent, api._get_current_rpc_agent())
      ret = agent._update_group_membership(
          worker_info, my_devices, reverse_device_map, is_join
      )
      return ret
  
imports: from contextlib import contextmanager
  from typing import cast
  import logging
  from .None import api
  from .None import TensorPipeAgent
label_desc: Use image node_id 2 for calling a global function with example usage: _update_group_membership(worker_info, my_devices, reverse_device_map, is_join) and returns: ret