<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(from_file=None, **kwargs):
    '''
    Create a new vm

    from_file : string
        json file to create the vm from -- if present, all other options will be ignored
    kwargs : string|int|...
        options to set for the vm

    CLI Example:

    .. code-block:: bash

        salt '*' vmadm.create from_file=/tmp/new_vm.json
        salt '*' vmadm.create image_uuid='...' alias='...' nics='[{ "nic_tag": "admin", "ip": "198.51.100.123", ...}, {...}]' [...]
    '''
    ret = {}
    # prepare vmcfg
    vmcfg = {}
    kwargs = salt.utils.args.clean_kwargs(**kwargs)
    for k, v in six.iteritems(kwargs):
        vmcfg[k] = v

    if from_file:
        return _create_update_from_file('create', path=from_file)
    else:
        return _create_update_from_cfg('create', vmcfg=vmcfg)