code: def load_certificate(
      filename: Union[str, os.PathLike]
  ) -> Tuple[bytes, Optional[bytes]]:
      """Load public and secret key from a zmq certificate.
  
      Returns (public_key, secret_key)
  
      If the certificate file only contains the public key,
      secret_key will be None.
  
      If there is no public key found in the file, ValueError will be raised.
      """
      public_key = None
      secret_key = None
      if not os.path.exists(filename):
          raise OSError(f"Invalid certificate file: {filename}")
  
      with open(filename, "rb") as f:
          for line in f:
              line = line.strip()
              if line.startswith(b"#"):
                  continue
              if line.startswith(b"public-key"):
                  public_key = line.split(b"=", 1)[1].strip(b" \t'\"")
              if line.startswith(b"secret-key"):
                  secret_key = line.split(b"=", 1)[1].strip(b" \t'\"")
              if public_key and secret_key:
                  break
  
      if public_key is None:
          raise ValueError("No public key found in %s" % filename)
  
      return public_key, secret_key
  
file_path: catboost/contrib/python/pyzmq/py3/zmq/auth/certs.py
imports: import datetime
  import glob
  import os
  from typing import Dict, Optional, Tuple, Union
  import zmq
label_desc: Use image node_id 3 for calling a global function with example usage: load_certificate(filename) and returns: public_key,  secret_key