import pathlib
import json


def read_metadata(experiment_root):
    """Read experiment metadata file into a dictionary."""
    metadata_file = pathlib.Path(experiment_root) / 'experiment_metadata.json'
    return json.loads(metadata_file.read_text())