code: def get_image_module_info(module_or_spec, required=False):
    
    return module_or_spec.get_attached_message(
        IMAGE_MODULE_INFO_KEY, ImageModuleInfo, required=required)
docs: Returns the module's attached ImageModuleInfo message, or None.