code: def _make_length_filter_fn(length_name, max_length):
      """Returns a predicate function which takes in data sample
      and returns a bool indicating whether to filter by length.
      """
  
      def _filter_fn(data):
          return data[length_name] <= max_length
  
      return _filter_fn
  
imports: import six
  import tensorflow
  import numpy
  from texar.tf.utils import utils
label_desc: Use image node_id 1 for calling a global function with example usage: _make_length_filter_fn(length_name, max_length) and returns: _filter_fn, unknown