def METHOD_NAME(devices):
    for device in devices:
        try:
            tf.config.experimental.METHOD_NAME(device, True)
        except (ValueError, RuntimeError) as e:
            default_logger.info("{}: {}".format(device, e))