docs: def get_language_from_extension(file_name):
      """Returns a matching language for the given file extension.
  
      When guessed_language is 'C', does not restrict to known file extensions.
      """
  
      filepart, extension = os.path.splitext(file_name)
      pathpart, filename = os.path.split(file_name)
  
      if filename == 'go.mod':
          return 'Go'
  
      if re.match(r'\.h.*$', extension, re.IGNORECASE) or re.match(r'\.c.*$', extension, re.IGNORECASE):
  
          if os.path.exists(u('{0}{1}').format(u(filepart), u('.c'))) or os.path.exists(u('{0}{1}').format(u(filepart), u('.C'))):
              return 'C'
  
          if os.path.exists(u('{0}{1}').format(u(filepart), u('.m'))) or os.path.exists(u('{0}{1}').format(u(filepart), u('.M'))):
              return 'Objective-C'
  
          if os.path.exists(u('{0}{1}').format(u(filepart), u('.mm'))) or os.path.exists(u('{0}{1}').format(u(filepart), u('.MM'))):
              return 'Objective-C++'
  
          available_extensions = extensions_in_same_folder(file_name)
  
          for ext in CppLexer.filenames:
              ext = ext.lstrip('*')
              if ext in available_extensions:
                  return 'C++'
  
          if '.c' in available_extensions:
              return 'C'
  
      if re.match(r'\.m$', extension, re.IGNORECASE) and (os.path.exists(u('{0}{1}').format(u(filepart), u('.h'))) or os.path.exists(u('{0}{1}').format(u(filepart), u('.H')))):
          return 'Objective-C'
  
      if re.match(r'\.mm$', extension, re.IGNORECASE) and (os.path.exists(u('{0}{1}').format(u(filepart), u('.h'))) or os.path.exists(u('{0}{1}').format(u(filepart), u('.H')))):
          return 'Objective-C++'
  
      return None