<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _hasattr(self, fieldname):
 """Returns True if this packet contains fieldname, False otherwise."""

        special = 'history', 'raw'
        return (fieldname in special or 
                fieldname in self._defn.fieldmap or
                fieldname in self._defn.derivationmap)