def get_language_from_extension(file_name):
    """Returns a matching language for the given file extension.
    """

    filepart, extension = os.path.splitext(file_name)

    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'

    extension = extension.lower()
    if extension == '.h':
        directory = os.path.dirname(file_name)
        available_files = os.listdir(directory)
        available_extensions = list(zip(*map(os.path.splitext, available_files)))[1]
        available_extensions = [ext.lower() for ext in available_extensions]
        if '.cpp' in available_extensions:
            return 'C++'
        if available_extensions in '.c':
            return 'C'

    return None
dataset/ETHPy150Open wakatime/sublime-wakatime/packages/wakatime/stats.py/get_language_from_extension/swapped operands of `in`