Return the pattern defined by the key string specific to the platform.

        :param platform:
        :param key:
        :param compiled:
        :return: Pattern string or RE object.

def pattern(self, platform, key, compiled=True):
        """Return the pattern defined by the key string specific to the platform.

        :param platform:
        :param key:
        :param compiled:
        :return: Pattern string or RE object.
        """
        patterns = self._platform_patterns(platform, compiled=compiled)
        pattern = patterns.get(key, self._platform_patterns(compiled=compiled).get(key, None))

        if pattern is None:
            raise KeyError("Patterns database corrupted. Platform: {}, Key: {}".format(platform, key))

        return pattern