def _parse_tdim(tdim):
 m = (tdim and TDIM_RE.match(tdim))
 if m:
  dims = m.group('dims')
  return tuple((int(d.strip()) for d in dims.split(',')))[::(-1)]
 return tuple()

def _parse_tdim ( tdim ) : m = ( tdim and TDIM_RE . match ( tdim ) ) if m : dims = m . group ( 'dims' ) return tuple ( ( int ( d . strip ( ) ) for d in dims . split ( ',' ) ) ) [ : : ( - 1 ) ] return tuple ( )
parse the tdim value into a tuple .