def mrv_max3(f, expsf, g, expsg, union, expsboth, x):
 if (not isinstance(f, SubsSet)):
  raise TypeError('f should be an instance of SubsSet')
 if (not isinstance(g, SubsSet)):
  raise TypeError('g should be an instance of SubsSet')
 if (f == SubsSet()):
  return (g, expsg)
 elif (g == SubsSet()):
  return (f, expsf)
 elif f.meets(g):
  return (union, expsboth)
 c = compare(list(f.keys())[0], list(g.keys())[0], x)
 if (c == '>'):
  return (f, expsf)
 elif (c == '<'):
  return (g, expsg)
 else:
  if (c != '='):
   raise ValueError('c should be =')
  return (union, expsboth)

def mrv_max3 ( f , expsf , g , expsg , union , expsboth , x ) : if ( not isinstance ( f , SubsSet ) ) : raise TypeError ( 'f should be an instance of SubsSet' ) if ( not isinstance ( g , SubsSet ) ) : raise TypeError ( 'g should be an instance of SubsSet' ) if ( f == SubsSet ( ) ) : return ( g , expsg ) elif ( g == SubsSet ( ) ) : return ( f , expsf ) elif f . meets ( g ) : return ( union , expsboth ) c = compare ( list ( f . keys ( ) ) [ 0 ] , list ( g . keys ( ) ) [ 0 ] , x ) if ( c == '>' ) : return ( f , expsf ) elif ( c == '<' ) : return ( g , expsg ) else : if ( c != '=' ) : raise ValueError ( 'c should be =' ) return ( union , expsboth )
computes the maximum of two sets of expressions f and g .