code: def assert_object(
      result, expected_type, geo_name="geometry", crs=crs_wgs
  ):
      """
      Helper method to make tests easier to read. Checks result is of the expected
      type. If result is a GeoDataFrame or GeoSeries, checks geo_name
      and crs match. If geo_name is None, then we expect a GeoDataFrame
      where the geometry column is invalid/ isn't set. This is never desirable,
      but is a reality of this first stage of implementation.
      """
      assert type(result) is expected_type
  
      if expected_type == GeoDataFrame:
          assert geo_name is not None
          _check_metadata_gdf(result, geo_name=geo_name, crs=crs)
  
      elif expected_type == GeoSeries:
          _check_metadata_gs(result, name=geo_name, crs=crs)
  
imports: import pandas
  import pyproj
  import pytest
  from shapely.geometry import Point
  import numpy
  from geopandas import GeoDataFrame, GeoSeries
  from geopandas.testing import assert_geodataframe_equal
label_desc: Use image node_id 5 for calling a global function with example usage: assert_object(result, expected_type, geo_name, crs) without return types