I am using ctypes to call SMJobCopyDictionary which returns a CFDictionaryRef. Is there a way to cast that to an NSDictionary such that I can use the regular pyobjc APIs? For example,

cfdictionary = SMJobCopyDictionary(...)
job_description = cast(cfdictionary, pyobjc_dictionary)
program_arguments = job_description['ProgramArguments']
...