def get_assessment_part_lookup_session(runtime, proxy, section=None):
<EOL>try:<EOL><INDENT>config = runtime.get_configuration()<EOL>parameter_id = Id('<STR_LIT>')<EOL>import_path_with_class = config.get_value_by_parameter(parameter_id).get_string_value()<EOL>module_path = '<STR_LIT:.>'.join(import_path_with_class.split('<STR_LIT:.>')[<NUM_LIT:0>:-<NUM_LIT:1>])<EOL>magic_class = import_path_with_class.split('<STR_LIT:.>')[-<NUM_LIT:1>]<EOL>module = importlib.import_module(module_path)<EOL>part_lookup_session = getattr(module, magic_class)(section,<EOL>runtime=runtime,<EOL>proxy=proxy)<EOL><DEDENT>except (AttributeError, KeyError, NotFound):<EOL><INDENT>mgr = get_provider_manager('<STR_LIT>',<EOL>runtime=runtime,<EOL>proxy=proxy,<EOL>local=True)<EOL>part_lookup_session = mgr.get_assessment_part_lookup_session(proxy=proxy)<EOL><DEDENT>return part_lookup_session<EOL>
returns an assessment part lookup session, perhaps even a magic one