def METHOD_NAME(gpg_home, keyring_fname):
    ring_path = os.path.join(gpg_home, keyring_fname)
    if not os.path.isdir("/etc/apt/trusted.gpg.d"):
        print("/etc/apt/trusted.gpg.d doesn't exist")
        print("apt-get install debian-archive-keyring may "
              "fix this problem")
        sys.exit(20)
    if os.path.exists("/etc/apt/trusted.gpg"):
        system(f'cp /etc/apt/trusted.gpg "{ring_path}"')
    gpg_options = f'--keyring "{ring_path}" --no-auto-check-trustdb ' \
                  '--trust-model always --no-default-keyring ' \
                  '--batch ' \
                  f'--homedir "{gpg_home}"'
    trustkeys = os.listdir("/etc/apt/trusted.gpg.d")
    for key in trustkeys:
        print(f"Import {key}: ")
        try:
            system(
                f'gpg {gpg_options} '
                f'--import "{os.path.join("/etc/apt/trusted.gpg.d", key)}"')
        except CommandError:
            print(f'adding keyring "{key}" to keyring "{ring_path}" failed')