code: def test_get_obj_in_upper_tree():
      m = Map()
      fg = FeatureGroup().add_to(m)
      marker = Marker(location=(0, 0)).add_to(fg)
      assert get_obj_in_upper_tree(marker, FeatureGroup) is fg
      assert get_obj_in_upper_tree(marker, Map) is m
      # The search should only go up, not down:
      with pytest.raises(ValueError):
          assert get_obj_in_upper_tree(fg, Marker)
      with pytest.raises(ValueError):
          assert get_obj_in_upper_tree(marker, Popup)
  
file_path: folium/tests/test_utilities.py
imports: import numpy
  import pandas
  import pytest
  from folium import FeatureGroup, Map, Marker, Popup
  from folium.utilities import _is_url, camelize, deep_copy, escape_double_quotes, get_obj_in_upper_tree, if_pandas_df_convert_to_numpy, javascript_identifier_path_to_array_notation, parse_options, validate_location, validate_locations, validate_multi_locations
label_desc: Use image node_id 9 for calling a global function with example usage: test_get_obj_in_upper_tree() without return types