<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_sid(cls, sid):
 """Retrieve the Substance record for the specified SID. :param int sid: The PubChem Substance Identifier (SID). """

        record = json.loads(request(sid, 'sid', 'substance').read().decode())['PC_Substances'][0]
        return cls(record)