def bounds(arg):
 if isinstance(arg, dict):
  if (('southwest' in arg) and ('northeast' in arg)):
   return ('%s|%s' % (latlng(arg['southwest']), latlng(arg['northeast'])))
 raise TypeError(('Expected a bounds (southwest/northeast) dict, but got %s' % type(arg).__name__))

def bounds ( arg ) : if isinstance ( arg , dict ) : if ( ( 'southwest' in arg ) and ( 'northeast' in arg ) ) : return ( '%s|%s' % ( latlng ( arg [ 'southwest' ] ) , latlng ( arg [ 'northeast' ] ) ) ) raise TypeError ( ( 'Expected a bounds (southwest/northeast) dict, but got %s' % type ( arg ) . __name__ ) )
converts a lat/lon bounds to a comma- and pipe-separated string .