def _initfile(path, data="<STR_LIT>"):
data = {} if data.lower() == "<STR_LIT>" else []<EOL>if not os.path.exists(path):  <EOL><INDENT>dirname = os.path.dirname(path)<EOL>if dirname and not os.path.exists(dirname):<EOL><INDENT>raise IOError(<EOL>("<STR_LIT>"<EOL>"<STR_LIT>").format(os.path.dirname(path))<EOL>)<EOL><DEDENT>with open(path, "<STR_LIT:w>") as f:<EOL><INDENT>json.dump(data, f)<EOL><DEDENT>return True<EOL><DEDENT>elif os.path.getsize(path) == <NUM_LIT:0>:  <EOL><INDENT>with open(path, "<STR_LIT:w>") as f:<EOL><INDENT>json.dump(data, f)<EOL><DEDENT><DEDENT>else:  <EOL><INDENT>return False<EOL><DEDENT>
Initialize an empty JSON file.