code: def load_key(pubkey):
      """Load public RSA key, with work-around for keys using
      incorrect header/footer format.
  
      Read more about RSA encryption with cryptography:
      https://cryptography.io/latest/hazmat/primitives/asymmetric/rsa/
      """
      try:
          return load_pem_public_key(pubkey.encode(), default_backend())
      except ValueError:
          # workaround for https://github.com/travis-ci/travis-api/issues/196
          pubkey = pubkey.replace("BEGIN RSA", "BEGIN").replace(
              "END RSA", "END"
          )
          return load_pem_public_key(pubkey.encode(), default_backend())
  
file_path: tensorboard_logger/travis_pypi_setup.py
imports: from __future__ import print_function
  import base64
  import json
  import os
  from getpass import getpass
  import yaml
  from cryptography.hazmat.primitives.serialization import load_pem_public_key
  from cryptography.hazmat.backends import default_backend
  from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15
label_desc: Use image node_id 1 for calling a global function with example usage: load_key(pubkey) and returns: load_pem_public_key, load_pem_public_key