def METHOD_NAME(values):
    """
    .. function:: RPC Environment.create(values)
        Create a new environment object and store it in the database.
        :param values: Field values for :class:`tcms.testruns.models.Environment`
        :type values: dict
        :return: Serialized :class:`tcms.testruns.models.Environment` object
        :rtype: dict
        :raises ValueError: if input values don't validate
        :raises PermissionDenied: if missing *testruns.add_environment* permission
    """
    form = EnvironmentForm(values)
    if form.is_valid():
        environment = form.save()
        return model_to_dict(environment)
    raise ValueError(list(form.errors.items()))