code: def load_certificates(directory="."):
      """Load public keys from all certificates in a directory"""
      certs = {}
      if not os.path.isdir(directory):
          raise IOError(
              "Invalid certificate directory: {0}".format(directory)
          )
      # Follow czmq pattern of public keys stored in *.key files.
      glob_string = os.path.join(directory, "*.key")
  
      cert_files = glob.glob(glob_string)
      for cert_file in cert_files:
          public_key, _ = load_certificate(cert_file)
          if public_key:
              certs[public_key] = True
      return certs
  
file_path: catboost/contrib/python/pyzmq/py2/zmq/auth/certs.py
imports: import datetime
  import glob
  import io
  import os
  import zmq
  from zmq.utils.strtypes import bytes, unicode, b, u
label_desc: Use image node_id 4 for calling a global function with example usage: load_certificates(directory) and returns: certs