<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upload_rabbitmq_environment_conf(template_name=None, context=None, restart=True):
 """Upload RabbitMQ environment configuration from a template."""

    
    template_name = template_name or u'rabbitmq/rabbitmq-env.conf'
    destination = u'/etc/rabbitmq/rabbitmq-env.conf'
    upload_template(template_name, destination, context=context, use_sudo=True)
    if restart:
        restart_service(u'rabbitmq')