docstr: We need this custom serialization because we can't pickle thread.lock objects that are used by the
  use_credentials context manager.
  
  https://docs.ray.io/en/latest/ray-core/objects/serialization.html#customized-serialization
docstr_tok: ["We","need","this","custom","serialization","because","we","ca","n't","pickle","thread.lock","objects","that","are","used","by","the","use_credentials","context","manager",".","https",":","\/\/docs.ray.io\/en\/latest\/ray-core\/objects\/serialization.html","#","customized-serialization"]
code: def __reduce__(self):
      """We need this custom serialization because we can't pickle thread.lock objects that are used by the
      use_credentials context manager.
  
      https://docs.ray.io/en/latest/ray-core/objects/serialization.html#customized-serialization
      """
      deserializer = RemoteSyncer
      serialized_data = (self.sync_period, self.creds)
      return deserializer, serialized_data
  
file_path: ludwig/ludwig/hyperopt/syncer.py
imports: from typing import Any, Callable, Dict, List, Optional, Tuple
  from ray.tune.syncer import _BackgroundSyncer
  from ludwig.utils.data_utils import use_credentials
  from ludwig.utils.fs_utils import delete, download, upload
label_desc: Use image node_id 5 for calling the RemoteSyncer obj's underlying member method code with example usage: obj.__reduce__() and returns: deserializer,  serialized_data