<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def follow(resources, **kwargs):
 """ Follow publications involved with resources. """

    # subscribe
    client = redis.Redis(decode_responses=True, **kwargs)
    resources = resources if resources else find_resources(client)
    channels = [Keys.EXTERNAL.format(resource) for resource in resources]
    if resources:
        subscription = Subscription(client, *channels)

    # listen
    while resources:
        try:
            message = subscription.listen()
            if message['type'] == 'message':
                print(message['data'])
        except KeyboardInterrupt:
            break