code: def test_fetch_metadata_function_with_exp_name(tmpdir):
      # Setup and run three experiments
      root = tmpdir.strpath
      run_test_experiment(
          exp_name="experiment 1 alpha", exp_id="1234", root_dir=root
      )
      run_test_experiment(
          exp_name="experiment 2 beta", exp_id="5678", root_dir=root
      )
      run_test_experiment(
          exp_name="experiment 3 alpha", exp_id="9990", root_dir=root
      )
  
      tinydb_reader = TinyDbReader(root)
  
      # Test Fetch by exp name
      res1 = tinydb_reader.fetch_metadata(exp_name="alpha")
      assert len(res1) == 2
      res2 = tinydb_reader.fetch_metadata(exp_name="experiment 1")
      assert len(res2) == 1
      assert res2[0]["experiment"]["name"] == "experiment 1 alpha"
      res2 = tinydb_reader.fetch_metadata(exp_name="foo")
      assert len(res2) == 0
  
imports: from __future__ import division, print_function, unicode_literals, absolute_import
  import datetime
  import os
  import tempfile
  import io
  import pytest
  from tinydb import Query
  from sacred.dependencies import get_digest
  from sacred.observers.tinydb_hashfs import TinyDbObserver, TinyDbReader
label_desc: Use image node_id 7 for calling a global function with example usage: test_fetch_metadata_function_with_exp_name(tmpdir) without return types