code: def get_checked_max_len(maxLen):
      if maxLen is None:
          maxLen = DEFAULT_MAX_LEN
      if not maxLen > 0:
          raise Exception("Invalid maximum length")
      return maxLen
  
imports: import abc
  import six
  from six.moves import xrange
  from pyalgotrade import observer
  from pyalgotrade.utils import collections
label_desc: Use image node_id 1 for calling a global function with example usage: get_checked_max_len(maxLen) and returns: maxLen