def create_environment(client, resource_group_name, lab_name, name,
    arm_template, parameters=None, artifact_source_name=None, user_name=
    '@me', tags=None):
    """ Command to create an environment the Azure DevTest Lab """
    from azure.mgmt.devtestlabs.models import EnvironmentDeploymentProperties, DtlEnvironment
    environment_deployment_properties = EnvironmentDeploymentProperties(
        arm_template, parameters)
    dtl_environment = DtlEnvironment(tags=tags, deployment_properties=
        environment_deployment_properties)
    return client.create_or_update(resource_group_name, lab_name, user_name,
        name, dtl_environment)
