def _normalize_ids(arg, atoms=set(IdType)):
 if (not arg):
  return ()
 if (arg.__class__ in atoms):
  return (arg,)
 return tuple(arg)

def _normalize_ids ( arg , atoms = set ( IdType ) ) : if ( not arg ) : return ( ) if ( arg . __class__ in atoms ) : return ( arg , ) return tuple ( arg )
normalizes the ids argument for browse to a tuple .