def METHOD_NAME(snapshot, descriptor_calculator, target_calculator,
                         input_shm_name, output_shm_name):
    """
    Load a snapshot into shared memory.
    Limited to numpy files for now.
    Parameters
    ----------
    snapshot : mala.datahandling.snapshot.Snapshot
        Snapshot to be loaded.
    descriptor_calculator : mala.descriptors.descriptor.Descriptor
        Used to do unit conversion on input data.
    target_calculator : mala.targets.target.Target or derivative
        Used to do unit conversion on output data.
    input_shm_name : str
        Name of the input shared memory buffer.
    output_shm_name : str
        Name of the output shared memory buffer.
    """
    # Get shared mem
    input_shm = shared_memory.SharedMemory(name=input_shm_name)
    output_shm = shared_memory.SharedMemory(name=output_shm_name)
    if snapshot.snapshot_type == "numpy":
        input_shape, input_dtype = descriptor_calculator. \
            read_dimensions_from_numpy_file(
            os.path.join(snapshot.input_npy_directory,
                         snapshot.input_npy_file), read_dtype=True)
        output_shape, output_dtype = target_calculator. \
            read_dimensions_from_numpy_file(
            os.path.join(snapshot.output_npy_directory,
                         snapshot.output_npy_file), read_dtype=True)
    elif snapshot.snapshot_type == "openpmd":
        input_shape, input_dtype = descriptor_calculator. \
            read_dimensions_from_openpmd_file(
            os.path.join(snapshot.input_npy_directory,
                         snapshot.input_npy_file), read_dtype=True)
        output_shape, output_dtype = target_calculator. \
            read_dimensions_from_openpmd_file(
            os.path.join(snapshot.output_npy_directory,
                         snapshot.output_npy_file), read_dtype=True)
    else:
        raise Exception("Invalid snapshot type selected.")
    # Form numpy arrays from shm buffers
    input_data = np.ndarray(shape=input_shape, dtype=input_dtype,
                            buffer=input_shm.buf)
    output_data = np.ndarray(shape=output_shape, dtype=output_dtype,
                             buffer=output_shm.buf)
    # Load numpy data into shm buffers
    if snapshot.snapshot_type == "numpy":
        descriptor_calculator. \
            read_from_numpy_file(
            os.path.join(snapshot.input_npy_directory,
                         snapshot.input_npy_file),
            units=snapshot.input_units,
            array=input_data)
        target_calculator. \
            read_from_numpy_file(
            os.path.join(snapshot.output_npy_directory,
                         snapshot.output_npy_file),
            units=snapshot.output_units,
            array=output_data)
    else :
        descriptor_calculator. \
            read_from_openpmd_file(
            os.path.join(snapshot.input_npy_directory,
                         snapshot.input_npy_file),
            units=snapshot.input_units,
            array=input_data)
        target_calculator. \
            read_from_openpmd_file(
            os.path.join(snapshot.output_npy_directory,
                         snapshot.output_npy_file),
            units=snapshot.output_units,
            array=output_data)
    # This function only loads the numpy data with scaling. Remaining data
    # preprocessing occurs in __getitem__ of LazyLoadDatasetSingle
    input_shm.close()
    output_shm.close()