<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_excluded(self, path, exclude=None):

 """
 Return if path is in exclude pattern.
 """

        for pattern in (exclude or self.exclude_pattern):
            if path.match(pattern):
                return True
        else:
            return False