<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _pattern_match(self, item, pattern):
 """Determine whether the item supplied is matched by the pattern."""

        if pattern.endswith('*'):
            return item.startswith(pattern[:-1])
        else:
            return item == pattern