code: def get_name_as_short_text(cls, name_field: cryptography.x509.Name) -> str:
          
          # Name_field is supposed to be a Subject or an Issuer; print the CN if there is one
          common_names = cls.get_common_names(name_field)
          if common_names:
              # We don't support certs with multiple CNs
              return common_names[0]
          else:
              # Otherwise show the whole field
              return cls.get_name_as_text(name_field)
docs: Convert a name field returned by the cryptography module to a string suitable for displaying it to the user.