<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _metadata(image, datapath):
 """Function which returns metadata dict. :param image: image to get spacing from :param datapath: path to data :return: {'series_number': '', 'datadir': '', 'voxelsize_mm': ''} """

    metadata = {'series_number': 0, 'datadir': datapath}
    spacing = image.GetSpacing()
    metadata['voxelsize_mm'] = [
        spacing[2],
        spacing[0],
        spacing[1],
    ]
    return metadata