def _get_grain(proxy, name):
 grains = _retrieve_grains(proxy)
 if (grains.get('result', False) and grains.get('out', {})):
  return grains.get('out').get(name)

def _get_grain ( proxy , name ) : grains = _retrieve_grains ( proxy ) if ( grains . get ( 'result' , False ) and grains . get ( 'out' , { } ) ) : return grains . get ( 'out' ) . get ( name )
retrieves the grain value from the cached dictionary .