code: def _parse_known_pattern(self, pattern: str) -> List[str]:
          
          if pattern.endswith(os.path.sep):
              patterns = [
                  filename
                  for filename in os.listdir(pattern)
                  if os.path.isdir(os.path.join(pattern, filename))
              ]
          else:
              patterns = [pattern]
  
          return patterns
docs: Expand pattern if identified as a directory and return found sub packages