docs: def get_monitor() -> Optional[resource_pb2_grpc.ResourceMonitorStub]:
      """
      Returns the current resource monitoring service client for RPC communications.
      """
      monitor = SETTINGS.monitor
      if not monitor:
          require_test_mode_enabled()
      return monitor