code: def _getSyntaxByFirstLine(self, firstLine):
          
          for pattern, xmlFileName in self._firstLineToXmlFileName.items():
              if fnmatch.fnmatch(firstLine, pattern):
                  return self._getSyntaxByXmlFileName(xmlFileName)
          else:
              raise KeyError("No syntax for " + firstLine)
docs: Get syntax by first line of the file