def find_resources(client):
    """ Detect dispensers and return corresponding resources. """
    wildcard = Keys.DISPENSER.format('*')
    pattern = re.compile(Keys.DISPENSER.format('(.*)'))
    return [pattern.match(d).group(1)
            for d in client.scan_iter(wildcard)]
def find_resources ( client ) : wildcard = Keys . DISPENSER . format ( '*' ) pattern = re . compile ( Keys . DISPENSER . format ( '(.*)' ) ) return [ pattern . match ( d ) . group ( 1 ) for d in client . scan_iter ( wildcard ) ]
Detect dispensers and return corresponding resources.