def _get_dvs_portgroup(dvs, portgroup_name):
 for portgroup in dvs.portgroup:
  if (portgroup.name == portgroup_name):
   return portgroup
 return None

def _get_dvs_portgroup ( dvs , portgroup_name ) : for portgroup in dvs . portgroup : if ( portgroup . name == portgroup_name ) : return portgroup return None
return a portgroup object corresponding to the portgroup name on the dvs .