def load(self, source):
        """ Load a snapshot from a file path or a file object """
        # 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 __HOLE__:
            pass
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/snapshot.py/Snapshot.load