code: def example_valid_size(example, min_length, max_length):
      length = example_length(example)
      return tf.logical_and(
          length >= min_length,
          length <= max_length,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import multiprocessing
  import random
  import six
  from six.moves import range
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import mlperf_log
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 3 for calling a global function with example usage: example_valid_size(example, min_length, max_length) and returns: tf