def METHOD_NAME(module):
    region = module.params["region"]
    state = module.params['state']
    name = module.params['name']
    organization = module.params['organization']
    project = module.params['project']
    size = module.params['size']
    volume_type = module.params['volume_type']
    module.params['api_url'] = SCALEWAY_LOCATION[region]["api_endpoint"]
    account_api = Scaleway(module)
    response = account_api.get('volumes')
    status_code = response.status_code
    volumes_json = response.json
    if project is None:
        project = organization
    if not response.ok:
        module.fail_json(msg='Error getting volume [{0}: {1}]'.format(
            status_code, response.json['message']))
    volumeByName = None
    for volume in volumes_json['volumes']:
        if volume['project'] == project and volume['name'] == name:
            volumeByName = volume
    if state in ('present',):
        if volumeByName is not None:
            module.exit_json(changed=False)
        payload = {'name': name, 'project': project, 'size': size, 'volume_type': volume_type}
        response = account_api.post('/volumes', payload)
        if response.ok:
            module.exit_json(changed=True, data=response.json)
        module.fail_json(msg='Error creating volume [{0}: {1}]'.format(
            response.status_code, response.json))
    elif state in ('absent',):
        if volumeByName is None:
            module.exit_json(changed=False)
        if module.check_mode:
            module.exit_json(changed=True)
        response = account_api.delete('/volumes/' + volumeByName['id'])
        if response.status_code == 204:
            module.exit_json(changed=True, data=response.json)
        module.fail_json(msg='Error deleting volume [{0}: {1}]'.format(
            response.status_code, response.json))