def METHOD_NAME():
    """
    Generate python and json parameterframe files
    """
    args = parse_args()
    param_classes = {}
    sys.path.insert(0, args.module)
    mods = find_modules(args.module)
    if len(mods) > 0:
        for mod in mods:
            path = Path(args.module, mod.replace(".", "/"))
            if not path.is_dir():
                module = get_module(f"{path}.py")
                param_classes.update(get_param_classes(module))
    else:
        module = get_module(args.module)
        param_classes.update(get_param_classes(module))
    bluemira_print(
        "Found ParameterFrames:\n" + "\n".join(sorted(k for k in param_classes.keys()))
    )
    output = {}
    params = {}
    bluemira_print(f"Writing output files to {args.directory}")
    if args.collapse:
        for vv in param_classes.values():
            add_to_dict(vv, output, params)
        with open(Path(args.directory, "params.py"), "w") as fh:
            fh.write(create_parameterframe(params))
        json_writer(output, file=Path(args.directory, "params.json"))
    else:
        for kk, vv in param_classes.items():
            output[kk] = {}
            params[kk] = {}
            add_to_dict(vv, output[kk], params[kk])
        with open(Path(args.directory, "params.py"), "w") as fh:
            header = True
            for out_name, out_val in output.items():
                pname = out_name.replace(" ", "")
                pname = pname.replace(":", "_")
                fh.write(create_parameterframe(params[out_name], pname, header=header))
                fh.write("\n")
                json_writer(out_val, file=Path(args.directory, f"{pname}.json"))
                header = False
    bluemira_print("Done")