def load(self, source):
        # Try to open, else assume it's a file object
        try:
            fp = open(source, "r")
            data = fp.read()
        except TypeError:
            data = source.read()
        try:
            # Load JSON into an OrderedDict
            parsed = json.loads(data, object_pairs_hook=collections.OrderedDict)
            self._load_json(parsed)
        except ValueError:
            self._load_deprecated(data)
        try:
            source.close()
        except AttributeError:
            pass
Load a snapshot from a file path or a file object
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/snapshot.py/Snapshot.load