human
Complete this python program:
def init(name, config=None, cpuset=None, cpushare=None, memory=None, profile=None, network_profile=None, nic_opts=None, cpu=None, autostart=True, password=None, password_encrypted=None, users=None, dnsservers=None, searchdomains=None, bridge=None, gateway=None, pub_key=None, priv_key=None, force_install=False, unconditional_install=False, bootstrap_delay=None, bootstrap_args=None, bootstrap_shell=None, bootstrap_url=None, **kwargs):
assistant
#Here is the Python code you requested.

    """Initialize a new container.
    This is a partial idempotent function as if it is already provisioned, we
    will reset a bit the lxc configuration file but much of the hard work will
    be escaped as markers will prevent re-execution of harmful tasks.
    name
    Name of the container
    image
    A tar archive to use as the rootfs for the container. Conflicts with
    the ``template`` argument.
    cpus
    Select a random number of cpu cores and assign it to the cpuset, if the
    cpuset option is set then this option will be ignored
    cpuset
    Explicitly define the cpus this container will be bound to
    cpushare
    cgroups cpu shares
    autostart
    autostart container on reboot
    memory
    cgroups memory limit, in MB
    .. versionchanged:: 2015.5.0
    If no value is passed, no limit is set. In earlier Salt versions,
    not passing this value causes a 1024MB memory limit to be set, and
    it was necessary to pass ``memory=0`` to set no limit.
    gateway
    the ipv4 gateway to use
    the default does nothing more than lxcutils does
    bridge
    the bridge to use
    the default does nothing more than lxcutils does
    network_profile
    Network profile to use for the container
    .. versionadded:: 2015.5.0
    nic_opts
    Extra options for network interfaces, will override
    ``{"eth0": {"hwaddr": "aa:bb:cc:dd:ee:ff", "ipv4": "10.1.1.1", "ipv6": "2001:db8::ff00:42:8329"}}``
    or
    ``{"eth0": {"hwaddr": "aa:bb:cc:dd:ee:ff", "ipv4": "10.1.1.1/24", "ipv6": "2001:db8::ff00:42:8329"}}``
    users
    Users for which the password defined in the ``password`` param should
    be set. Can be passed as a comma separated list or a python list.
    Defaults to just the ``root`` user.
    password
    Set the initial password for the users defined in the ``users``
    parameter
    password_encrypted : False
    Set to ``True`` to denote a password hash instead of a plaintext
    password
    .. versionadded:: 2015.5.0
    profile
    A LXC profile (defined in config or pillar).
   ..."""
    ret = {'name': name, 'changes': {}}
    profile = get_container_profile(copy.deepcopy(profile))
    if (not network_profile):
        network_profile = profile.get('network_profile')
    if (not network_profile):
        network_profile = DEFAULT_NIC
    changes_dict = {'init': []}
    changes = changes_dict.get('init')
    if (users is None):
        users = []
    dusers = ['root']
    for user in dusers:
        if (user not in users):
            users.append(user)
    kw_overrides = copy.deepcopy(kwargs)
    def select(key, default=None):
        kw_overrides_match = kw_overrides.pop(key, _marker)
        profile_match = profile.pop(key, default)
        if (kw_overrides_match is _marker):
            return profile_match
        return kw_overrides_match
    path = select('path')
    bpath = get_root_path(path)
    state_pre = state(name, path=path)
    tvg = select('vgname')
    vgname = (tvg if tvg else __salt__['config.get']('lxc.vgname'))
    start_ = select('start', True)
    autostart = select('autostart', autostart)
    seed = select('seed', True)
    install = select('install', True)
    seed_cmd = select('seed_cmd')
    salt_config = _get_salt_config(config, **kwargs)
    approve_key = select('approve_key', True)
    clone_from = select('clone_from')
    if (vgname and (not clone_from)):
        try:
            kwargs['vgname'] = vgname
            clone_from = _get_base(profile=profile, **kwargs)
        except (SaltInvocationError, CommandExecutionError) as exc:
            ret['comment'] = exc.strerror
            if changes:
                ret['changes'] = changes_dict
            return ret
        if (not (kwargs.get('snapshot') is False)):
            kwargs['snapshot'] = True
    does_exist = exists(name, path=path)
    to_reboot = False
    remove_seed_marker = False
    if does_exist:
        pass
    elif clone_from:
        remove_seed_marker = True
        try:
            clone(name, clone_from, profile=profile, **kwargs)
            changes.append({'create': 'Container   ...