<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isasteroid(self):
 """`True` if `targetname` appears to be an asteroid."""

        if self.asteroid is not None:
            return self.asteroid
        elif self.comet is not None:
            return not self.comet
        else:
            return any(self.parse_asteroid()) is not None