<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_metadata(self, file_id, metadata_fields=''):
        
        ''' a helper method for retrieving the metadata of a file '''
        
        title = '%s._get_metadata' % self.__class__.__name__
        
    # construct fields arg
        if not metadata_fields:
            metadata_fields = ','.join(self.object_file.keys())
        else:
            field_list = metadata_fields.split(',')
            for field in field_list:
                if not field in self.object_file.keys():
                    raise ValueError('%s(metadata_fields="%s") is not a valid drive file field' % (title, field))
    
    # send request
        try:
            metadata_details = self.drive.get(fileId=file_id, fields=metadata_fields).execute()
        except:
            raise DriveConnectionError(title)
        
        return metadata_details