def _get_desired_pkg(name, desired):
 if ((not desired[name]) or desired[name].startswith(('<', '>', '='))):
  oper = ''
 else:
  oper = '='
 return '{0}{1}{2}'.format(name, oper, ('' if (not desired[name]) else desired[name]))

def _get_desired_pkg ( name , desired ) : if ( ( not desired [ name ] ) or desired [ name ] . startswith ( ( '<' , '>' , '=' ) ) ) : oper = '' else : oper = '=' return '{0}{1}{2}' . format ( name , oper , ( '' if ( not desired [ name ] ) else desired [ name ] ) )
helper function that retrieves and nicely formats the desired pkg so that helpful information can be printed in the comment for the state .