def METHOD_NAME(filter_string: str) -> Dict[Any, Any]:
    """
    Converts the filter string to a dict. For example:
    'policy.label=label,cloud.type=aws' becomes -->
    {'policy.label': 'label1', 'cloud.type': 'aws'}
    Note that the API does not accept lists https://prisma.pan.dev/api/cloud/cspm/policy#operation/get-policies-v2
    This is not allowed: policy.label=label1,label2
    """
    filter_params = {}
    if isinstance(filter_string, str) and filter_string:
        filter_string = "".join(filter_string.split())
        try:
            for f in filter_string.split(','):
                f_name, f_value = f.split('=')
                filter_params[f_name] = f_value
        except (IndexError, ValueError) as e:
            logging.debug(f"Invalid filter format: {e}")
    return filter_params