<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_nginx_site_conf(site_name, template_name=None, context=None, enable=True):
 """Upload Nginx site configuration from a template."""

    
    template_name = template_name or [u'nginx/%s.conf' % site_name, u'nginx/site.conf']
    site_available = u'/etc/nginx/sites-available/%s' % site_name
    upload_template(template_name, site_available, context=context, use_sudo=True)
    if enable:
        enable_site(site_name)