code: def validate_range_str(range_str):
      """Helper function used inside validate_minibatch_size_str().
      Returns true if range_str is a a comma-separated list of
      positive integers and ranges of integers, like '128',
      '128,256', or '64-128,256'."""
      if not isinstance(range_str, str):
          return False
      ranges = range_str.split(",")
      assert len(ranges) > 0
      for r in ranges:
          # a range may be either e.g. '64', or '128-256'
          try:
              c = [int(x) for x in r.split(":")]
          except:
              return False
          # c should be either e.g. [ 128 ], or  [64,128].
          if len(c) == 1:
              if c[0] <= 0:
                  return False
          elif len(c) == 2:
              if c[0] <= 0 or c[1] < c[0]:
                  return False
          else:
              return False
      return True
  
imports: from __future__ import division
  import argparse
  import glob
  import logging
  import os
  import math
  import re
  import shutil
  import libs.common
  from libs.nnet3.train.dropout_schedule import *
  import unittest
label_desc: Use image node_id 8 for calling a global function with example usage: validate_range_str(range_str) and returns: True, False, False, False, False, False