'Create a node.
The `ex_create_attr` parameter can include the following dictionary
key and value pairs:
* `backups`: ``bool`` defaults to False
* `ipv6`: ``bool`` defaults to False
* `private_networking`: ``bool`` defaults to False
* `user_data`: ``str`` for cloud-config data
* `ssh_keys`: ``list`` of ``int`` key ids or ``str`` fingerprints
`ex_create_attr[\'ssh_keys\']` will override `ex_ssh_key_ids` assignment.
:keyword ex_create_attr: A dictionary of optional attributes for
droplet creation
:type ex_create_attr: ``dict``
:keyword ex_ssh_key_ids: A list of ssh key ids which will be added
to the server. (optional)
:type ex_ssh_key_ids: ``list`` of ``int`` key ids or ``str``
key fingerprints
:keyword    ex_user_data:  User data to be added to the node on create.
(optional)
:type       ex_user_data:  ``str``
:return: The newly created node.
:rtype: :class:`Node`'

def create_node(self, name, size, image, location, ex_create_attr=None, ex_ssh_key_ids=None, ex_user_data=None):

    attr = {'name': name, 'size': size.name, 'image': image.id, 'region': location.id, 'user_data': ex_user_data}
    if ex_ssh_key_ids:
        warnings.warn('The    ex_ssh_key_ids    parameter    has    been    deprecated    in    favor    of    the    ex_create_attr    parameter.')
        attr['ssh_keys'] = ex_ssh_key_ids
    ex_create_attr = (ex_create_attr or {})
    for key in ex_create_attr.keys():
        if (key in self.EX_CREATE_ATTRIBUTES):
            attr[key] = ex_create_attr[key]
    res = self.connection.request('/v2/droplets', data=json.dumps(attr), method='POST')
    data = res.object['droplet']
    status = res.object.get('status', 'OK')
    if (status == 'ERROR'):
        message = res.object.get('message', None)
        error_message = res.object.get('error_message', message)
        raise ValueError(('Failed    to    create    node:    %s' % error_message))
    return self._to_node(data=data)
