code: def avail_images(kwargs=None, call=None):
      '''
      Return a dict of all available VM images on the cloud provider.
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_images function must be called with '
              '-f or --function, or with the --list-images option'
          )
  
      if not isinstance(kwargs, dict):
          kwargs = {}
  
      if 'owner' in kwargs:
          owner = kwargs['owner']
      else:
          provider = get_configured_provider()
  
          owner = config.get_cloud_config_value(
              'owner', provider, __opts__, default='amazon'
          )
  
      ret = {}
      params = {'Action': 'DescribeImages',
                'Owner': owner}
      images = aws.query(params,
                         location=get_location(),
                         provider=get_provider(),
                         opts=__opts__,
                         sigver='4')
  
      for image in images:
          ret[image['imageId']] = image
      return ref avail_images(kwargs=None, call=None):
      '''
      Return a dict of all available VM images on the cloud provider.
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_images function must be called with '
              '-f or --function, or with the --list-images option'
          )
  
      if not isinstance(kwargs, dict):
          kwargs = {}
  
      if 'owner' in kwargs:
          owner = kwargs['owner']
      else:
          provider = get_configured_provider()
  
          owner = config.get_cloud_config_value(
              'owner', provider, __opts__, default='amazon'
          )
  
      ret = {}
      params = {'Action': 'DescribeImages',
                'Owner': owner}
      images = aws.query(params,
                         location=get_location(),
                         provider=get_provider(),
                         opts=__opts__,
                         sigver='4')
  
      for image in images:
          ret[image['imageId']] = image
      return ret
docs: Return a dict of all available VM images on the cloud provider.