def METHOD_NAME(context):
    # There is a bit of details to this, and we are making some optimizations as
    # well as customization to what path should be put there.
    statements = []
    code_objects = context.getCodeObjects()
    # Create the always identical, but dynamic filename first thing.
    module_filename = context.getOwner().getRunTimeFilename()
    # We do not care about release of this object, as code object live
    # forever anyway.
    if getFileReferenceMode() == "frozen" or os.path.isabs(module_filename):
        template = "module_filename_obj = %s; CHECK_OBJECT(module_filename_obj);"
    else:
        template = "module_filename_obj = MAKE_RELATIVE_PATH(%s); CHECK_OBJECT(module_filename_obj);"
    # The code object will not work from any other type, cannot be e.g. unicode.
    assert type(module_filename) is str, type(module_filename)
    statements.append(template % (context.getConstantCode(constant=module_filename)))
    for code_object_key, code_identifier in code_objects:
        # Make sure the filename is always identical.
        assert code_object_key.co_filename == module_filename, code_object_key
        args = (
            code_identifier,
            ", ".join(str(s) for s in _getMakeCodeObjectArgs(code_object_key, context)),
        )
        code = "%s = MAKE_CODE_OBJECT(module_filename_obj, %s);" % args
        statements.append(code)
        if context.getOwner().getFullName() == "__main__":
            if code_object_key[1] == "<module>":
                statements.append("codeobj_main = %s;" % code_identifier)
    return statements