input: Write a python function to traverse an object and a list, converting them into nested lists.
  assert traverse_object({'a': {'b': 2, 'c': 3}, 'd': 4}) == [['a', [['b', 2], ['c', 3]]], ['d', 4]]
  assert traverse_list([1, {'a': [2, 3]}, [4, {'b': 5}]]) == [1, [['a', [2, 3]]], [4, [['b', 5]]]]
  assert traverse_object({'key1': {'subkey1': {'subsubkey1': 1}, 'subkey2': 2}, 'key2': [3, 4, {'subkey3': 5}]}) == [['key1', [['subkey1', [['subsubkey1', 1]]], ['subkey2', 2]]], ['key2', [3, 4, [['subkey3', 5]]]]]
output: def traverse_object(obj):
      if isinstance(obj, dict):
          return [[k, traverse_object(v)] for k, v in obj.items()]
      elif isinstance(obj, list):
          return [traverse_object(i) for i in obj]
      else:
          return obj
  
  def traverse_list(lst):
      return traverse_object(lst)