def _linab(arg, symbol):
 arg = arg.expand()
 (ind, dep) = arg.as_independent(symbol)
 if (not arg.is_Add):
  b = 0
  (a, x) = (ind, dep)
 else:
  b = ind
  (a, x) = separatevars(dep).as_independent(symbol, as_Add=False)
 if x.could_extract_minus_sign():
  a = (- a)
  x = (- x)
 return (a, b, x)

def _linab ( arg , symbol ) : arg = arg . expand ( ) ( ind , dep ) = arg . as_independent ( symbol ) if ( not arg . is_Add ) : b = 0 ( a , x ) = ( ind , dep ) else : b = ind ( a , x ) = separatevars ( dep ) . as_independent ( symbol , as_Add = False ) if x . could_extract_minus_sign ( ) : a = ( - a ) x = ( - x ) return ( a , b , x )
return a .