def string_from_hierarchy(dimension, hierarchy):
 if hierarchy:
  return ('%s@%s' % (_path_part_escape(str(dimension)), _path_part_escape(str(hierarchy))))
 else:
  return _path_part_escape(str(dimension))

def string_from_hierarchy ( dimension , hierarchy ) : if hierarchy : return ( '%s@%s' % ( _path_part_escape ( str ( dimension ) ) , _path_part_escape ( str ( hierarchy ) ) ) ) else : return _path_part_escape ( str ( dimension ) )
returns a string in form dimension@hierarchy or dimension if hierarchy is none .