class_docstr: This is a mock class implementation of KmsClient, built for testing
  only.
docstr: Not a secure cipher - just extract the key from
  the wrapped key
docstr_tok: ["Not","a","secure","cipher","-","just","extract","the","key","from","the","wrapped","key"]
code: def unwrap_key(self, wrapped_key, master_key_identifier):
      """Not a secure cipher - just extract the key from
      the wrapped key"""
      expected_master_key = self.master_keys_map[master_key_identifier]
      decoded_wrapped_key = base64.b64decode(wrapped_key)
      master_key_bytes = decoded_wrapped_key[:16]
      decrypted_key = decoded_wrapped_key[16:]
      if expected_master_key == master_key_bytes.decode("utf-8"):
          return decrypted_key
      raise ValueError(
          "Incorrect master key used", master_key_bytes, decrypted_key
      )
  
file_path: arrow/python/pyarrow/tests/parquet/encryption.py
imports: import base64
  import pyarrow.parquet.encryption
label_desc: Use image node_id 3 for calling the InMemoryKmsClient obj's underlying member method code with example usage: obj.unwrap_key(wrapped_key, master_key_identifier) and returns: decrypted_key