code: def format_name(subject):
      
      if isinstance(subject, x509.Name):
          subject = [(OID_NAME_MAPPINGS[s.oid], s.value) for s in subject]
  
      return '/%s' % ('/'.join(['%s=%s' % (force_text(k), force_text(v)) for k, v in subject]))
docs: Convert a subject into the canonical form for distinguished names.
  
      This function does not take care of sorting the subject in any meaningful order.
  
      Examples::
  
          >>> format_name([('CN', 'example.com'), ])
          '/CN=example.com'
          >>> format_name([('CN', 'example.com'), ('O', "My Organization"), ])
          '/CN=example.com/O=My Organization'