code: def test_mock_data_auto(tmp_path):
      """Test `MockPolicy.AUTO` fallback to `USE_CODE`."""
      # By default, mock data should load metadata when present.
      with tfds.testing.mock_data():
          builder = tfds.builder("mnist")
          assert list(
              builder.info.splits.keys()
          )  # Metadata should loaded.
  
      # When mock data unknown, fallback to `USE_CODE` mode.
      with tfds.testing.mock_data(data_dir=tmp_path):
          builder = tfds.builder("mnist")
          assert not list(builder.info.splits.keys())
  
imports: import functools
  import pickle
  import numpy
  import pytest
  import tensorflow
  import tensorflow_datasets
label_desc: Use image node_id 11 for calling a global function with example usage: test_mock_data_auto(tmp_path) without return types