<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getScan(self, title, peptide=None):
 """ allows random lookup """

        if self.ra.has_key(title):
            self.filename.seek(self.ra[title][0],0)
            toRead = self.ra[title][1]-self.ra[title][0]
            info = self.filename.read(toRead)
            scan = self.parseScan(info)
        else:
            return None
        return scan