<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load(self, playerName=None):
 """retrieve the PlayerRecord settings from saved disk file"""

        if playerName: # switch the PlayerRecord this object describes
            self.name = playerName # preset value to load self.filename
        try:
            with open(self.filename, "rb") as f:
                data = f.read()
        except Exception:
            raise ValueError("invalid profile, '%s'. file does not exist: %s"%(self.name, self.filename))
        self.update(json.loads(data))
        self._matches = [] # mandate match history be recalculated for this newly loaded player