<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def findLabel(self, query, create=False):
 """Find a label with the given name. Args: name (Union[_sre.SRE_Pattern, str]):
 A str or regular expression to match against the name. create (bool):
 Whether to create the label if it doesn't exist (only if name is a str). Returns: Union[gkeepapi.node.Label, None]: The label. """

        if isinstance(query, six.string_types):
            query = query.lower()

        for label in self._labels.values():
            if (isinstance(query, six.string_types) and query == label.name.lower()) or \
                (isinstance(query, Pattern) and query.search(label.name)):
                return label

        return self.createLabel(query) if create and isinstance(query, six.string_types) else None