code: def _get_grain(name, proxy=None):
      '''
      Retrieves the grain value from the cached dictionary.
      '''
      grains = _retrieve_grains_cache(proxy=proxy)
      if grains.get('result', False) and grains.get('out', {}):
          return grains.get('out').get(namef _get_grain(name, proxy=None):
      '''
      Retrieves the grain value from the cached dictionary.
      '''
      grains = _retrieve_grains_cache(proxy=proxy)
      if grains.get('result', False) and grains.get('out', {}):
          return grains.get('out').get(name)
docs: Retrieves the grain value from the cached dictionary.