code: def retrieve_by_name(self, name, first_certificate=None):
          
  
          if not isinstance(name, x509.Name):
              raise TypeError(pretty_message(
                  '''
                  name must be an instance of asn1crypto.x509.Name, not %s
                  ''',
                  type_name(name)
              ))
  
          if first_certificate and not isinstance(first_certificate, x509.Certificate):
              raise TypeError(pretty_message(
                  '''
                  first_certificate must be an instance of
                  asn1crypto.x509.Certificate, not %s
                  ''',
                  type_name(first_certificate)
              ))
  
          hashable = name.hashable
  
          if hashable not in self._subject_map:
              return []
  
          certs = self._subject_map[hashable]
          first = None
          output = []
          for cert in certs:
              if first_certificate and first_certificate.sha256 == cert.sha256:
                  first = cert
              else:
                  output.append(cert)
          if first:
              output.insert(0, first)
          return output
docs: Retrieves a list certs via their subject name
  
          :param name:
              An asn1crypto.x509.Name object
  
          :param first_certificate:
              An asn1crypto.x509.Certificate object that if found, should be
              placed first in the result list
  
          :return:
              A list of asn1crypto.x509.Certificate objects