docs: def cycle_file(source_plaintext_filename):
      """Encrypts and then decrypts a file under a custom static master key provider.
  
      :param str source_plaintext_filename: Filename of file to encrypt
      """
      # Create a static random master key provider
      key_id = os.urandom(8)
      master_key_provider = StaticRandomMasterKeyProvider()
      master_key_provider.add_master_key(key_id)
  
      ciphertext_filename = source_plaintext_filename + ".encrypted"
      cycled_plaintext_filename = source_plaintext_filename + ".decrypted"
  
      # Encrypt the plaintext source data
      with open(source_plaintext_filename, "rb") as plaintext, open(ciphertext_filename, "wb") as ciphertext:
          with aws_encryption_sdk.stream(mode="e", source=plaintext, key_provider=master_key_provider) as encryptor:
              for chunk in encryptor:
                  ciphertext.write(chunk)
  
      # Decrypt the ciphertext
      with open(ciphertext_filename, "rb") as ciphertext, open(cycled_plaintext_filename, "wb") as plaintext:
          with aws_encryption_sdk.stream(mode="d", source=ciphertext, key_provider=master_key_provider) as decryptor:
              for chunk in decryptor:
                  plaintext.write(chunk)
  
      # Verify that the "cycled" (encrypted, then decrypted) plaintext is identical to the source
      # plaintext
      assert filecmp.cmp(source_plaintext_filename, cycled_plaintext_filename)
  
      # Verify that the encryption context used in the decrypt operation includes all key pairs from
      # the encrypt operation
      #
      # In production, always use a meaningful encryption context. In this sample, we omit the
      # encryption context (no key pairs).
      assert all(
          pair in decryptor.header.encryption_context.items() for pair in encryptor.header.encryption_context.items()
      )
      return ciphertext_filename, cycled_plaintext_filename