<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _match_state(self, state):
 """Checks whether a given State matches self.names."""

        return (self.names == '*'
                or state in self.names
                or state.name in self.names)