def rassoc(obj)
      obj = Erlang.from(obj)
      each do |array|
        next if !array.respond_to?(:[])
        return array if obj == array[1]
      end
      return nil
    end
def rassoc(obj)
      obj = Erlang.from(obj)
      each do |array|
        next if !array.respond_to?(:[])
        return array if obj == array[1]
      end
      return nil
    end
Assumes all elements are nested, indexable collections, and searches through them,
 comparing `obj` with the second element of each nested collection. Return
 the first nested collection which matches, or `nil` if none is found.
 Behaviour is undefined when elements do not meet assumptions (i.e. are
 not indexable collections).

 @example
   t = Erlang::Tuple[Erlang::Tuple["A", 10], Erlang::Tuple["B", 20], Erlang::Tuple["C", 30]]
   t.rassoc(20)  # => Erlang::Tuple["B", 20]

 @param obj [Object] The object to search for
 @return [Object]