<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _build_volume(self, volume):
 """ Given a generic volume definition, create the volumes element """

        self.volumes[self._build_volume_name(volume.get('host'))] = {
            'name': self._build_volume_name(volume.get('host')),
            'hostPath': {
                'path': volume.get('host')
            }
        }
        response = {
            'name': self._build_volume_name(volume.get('host')),
            'mountPath': volume.get('container'),

        }
        if volume.get('readonly', False):
            response['readOnly'] = bool(volume.get('readonly', False))
        return response