def to_compact_hash_with_index
      hash = {}
      self.each_with_index do |item, index|
        next if item.nil?
        value = yield(item, index)
        next if value.nil_or_empty?
        hash[item] = value
      end
      hash
    end
def to_compact_hash_with_index
      hash = {}
      self.each_with_index do |item, index|
        next if item.nil?
        value = yield(item, index)
        next if value.nil_or_empty?
        hash[item] = value
      end
      hash
    end
Returns a new Hash generated from this Collection with a block whose arguments include the enumerated item
 and its index. Every value which is nil or empty is excluded.

 @example
   [1, 2, 3].to_compact_hash_with_index { |item, index| item + index } #=> { 1 => 1, 2 => 3, 3 => 5 }
 @yield [item, index] the hash value
 @yieldparam item the enumerated value
 @yieldparam index the enumeration index
 @return [Hash] this {Enumerable} converted to a hash by the given block