def convert_globs_to_pattern(globs: list[str] | None):
    """Convert a list of globs to a re pattern list."""
    if not globs:
        return None
    translated_patterns = [
        pattern for glob in set(globs) if (pattern := fnmatch.translate(str(glob)))
    ]
    if not translated_patterns:
        return None
    inner = '|'.join(translated_patterns)
    combined = f'(?:{inner})'
    return re.compile(combined)
Convert a list of globs to a re pattern list.
custom_components/xiaomi_miot/core/utils.py