code: def arbitrary_channels_to_rgb(*args, **kwargs):
      """Arbitrary parametrization for testing"""
      channels = kwargs.pop("channels", None) or 10
      full_im = param.image(*args, channels=channels, **kwargs)
      r = tf.reduce_mean(full_im[..., : channels // 3] ** 2, axis=-1)
      g = tf.reduce_mean(
          full_im[..., channels // 3 : 2 * channels // 3] ** 2, axis=-1
      )
      b = tf.reduce_mean(
          full_im[..., 2 * channels // 3 :] ** 2, axis=-1
      )
      return tf.stack([r, g, b], axis=-1)
  
file_path: lucid/tests/optvis/test_integration.py
imports: from __future__ import absolute_import, division, print_function
  import pytest
  import tensorflow
  from lucid.optvis import objectives, param, render, transform
  from lucid.modelzoo.vision_models import InceptionV1
label_desc: Use image node_id 2 for calling a global function with example usage: arbitrary_channels_to_rgb() and returns: tf