@staticmethod<EOL><INDENT>def load(filename):<DEDENT>
if pimms.is_str(filename):<EOL><INDENT>filename = os.path.expandvars(os.path.expanduser(filename))<EOL>if not os.path.isfile(filename):<EOL><INDENT>raise ValueError('<STR_LIT>' % filename)<EOL><DEDENT>gz = (len(filename) > <NUM_LIT:3> and filename[-<NUM_LIT:3>:] == '<STR_LIT>')<EOL>dat = None<EOL>with (gzip.open(filename, '<STR_LIT>') if gz else open(filename, '<STR_LIT>')) as f:<EOL><INDENT>dat = json.load(f)<EOL><DEDENT>fname = filename<EOL><DEDENT>else:<EOL><INDENT>dat = json.load(filename)<EOL>fname = '<STR_LIT>'<EOL><DEDENT>dat = {k.lower():denormalize(v) for (k,v) in six.iteritems(dat)}<EOL>return PathTrace.denormalize(dat)<EOL>
PathTrace.load(filename) loads a path trace object from the given filename and returns it.