<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hasannotationlayer(self, annotationtype=None,set=None):
 """Does the specified annotation layer exist?"""

        l = self.layers(annotationtype, set)
        return (len(l) > 0)