code: def _convert_to_ewkb(gdf, geom_name, srid):
      """Convert geometries to ewkb."""
      geoms = shapely.to_wkb(
          shapely.set_srid(gdf[geom_name].values._data, srid=srid),
          hex=True,
          include_srid=True,
      )
  
      # The gdf will warn that the geometry column doesn't hold in-memory geometries
      # now that they are EWKB, so convert back to a regular dataframe to avoid warning
      # the user that the dtypes are unexpected.
      df = pd.DataFrame(gdf, copy=False)
      df[geom_name] = geoms
      return df
  
file_path: geopandas/geopandas/io/sql.py
imports: import warnings
  from contextlib import contextmanager
  import pandas
  import shapely
  import shapely.wkb
  from geopandas import GeoDataFrame
label_desc: Use image node_id 8 for calling a global function with example usage: _convert_to_ewkb(gdf, geom_name, srid) and returns: df