def METHOD_NAME(text, help_file_path):
    import os
    import json
    dir_name, base_name = os.path.split(help_file_path)
    pretty_file_path = os.path.join(os.path.basename(dir_name), base_name)
    if not text:
        raise CLIError("No content passed for {}.".format(pretty_file_path))
    try:
        return json.loads(text)
    except ValueError as e:
        raise CLIError("Error parsing {}:\n\n{}".format(pretty_file_path, e))