<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create(self, volume_id, vtype, size, affinity):
 """ create a volume """

        volume_id = volume_id or str(uuid.uuid4())
        params = {'volume_type_name': vtype,
                  'size': size,
                  'affinity': affinity}
        return self.http_put('/volumes/%s' % volume_id,
                             params=self.unused(params))