code: def _get_pattern(self, pattern_id):
          
          for key in ('PATTERNS1', 'PATTERNS2', 'PATTERNS3'):
              if key in self.tagged_blocks:
                  data = self.tagged_blocks.get_data(key)
                  for pattern in data:
                      if pattern.pattern_id == pattern_id:
                          return pattern
          return None
docs: Get pattern item by id.