code: def pattern(self, platform, key, compiled=True):
          
          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
docs: Return the pattern defined by the key string specific to the platform.
  
          :param platform:
          :param key:
          :param compiled:
          :return: Pattern string or RE object.