<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cache_stats():
 """ Returns a list of dictionaries of all cache servers and their stats, if they provide stats. """

    cache_stats = []
    for name, _ in six.iteritems(settings.CACHES):
        cache_backend = caches[name]

        try:
            cache_backend_stats = cache_backend._cache.get_stats()
        except AttributeError:  # this backend doesn't provide stats
            logger.info(
                'The memcached backend "{0}" does not support or '
                'provide stats.'.format(name)
            )
            continue

        for address, stats in cache_backend_stats:
            cache_stats.append(
                {'name': name, 'address': address, 'stats': stats}
            )
    return cache_stats