code: def sync_local_metadata_from_datastore(metadata_local_dir, task_ds):
      def echo_none(*args, **kwargs):
          pass
  
      key_to_load = task_ds.load_metadata(["local_metadata"])[
          "local_metadata"
      ]
      _, tarball = next(
          task_ds.parent_datastore.load_data([key_to_load])
      )
      with util.TempDir() as td:
          with tarfile.open(
              fileobj=BytesIO(tarball), mode="r:gz"
          ) as tar:
              util.tar_safe_extract(tar, td)
          copy_tree(
              os.path.join(td, metadata_local_dir),
              LocalStorage.get_datastore_root_from_config(echo_none),
              update=True,
          )
  
file_path: metaflow/metaflow/metadata/util.py
imports: from io import BytesIO
  import os
  import shutil
  import tarfile
  from metaflow import util
  from metaflow.plugins.datastores.local_storage import LocalStorage
label_desc: Use image node_id 3 for calling a global function with example usage: sync_local_metadata_from_datastore(metadata_local_dir, task_ds) without return types