code: def ensure_valid_dtype(
      input_graph: Graph, input: cudf.Series, input_name: str
  ):
      vertex_dtype = input_graph.edgelist.edgelist_df.dtypes[0]
      input_dtype = input.dtype
      if input_dtype != vertex_dtype:
          warning_msg = (
              f"Subgraph requires '{input_name}' "
              "to match the graph's 'vertex' type. "
              f"input graph's vertex type is: {vertex_dtype} and got "
              f"'{input_name}' of type: "
              f"{input_dtype}."
          )
          warnings.warn(warning_msg, UserWarning)
          input = input.astype(vertex_dtype)
  
      return input
  
file_path: cugraph/python/cugraph/cugraph/community/induced_subgraph.py
imports: import warnings
  from typing import Union, Tuple
  import cudf
  from pylibcugraph import ResourceHandle
  from pylibcugraph import induced_subgraph
  from cugraph.structure import Graph
  from cugraph.utilities import ensure_cugraph_obj_for_nx, cugraph_to_nx
  from cugraph.utilities.utils import import_optional
label_desc: Use image node_id 1 for calling a global function with example usage: ensure_valid_dtype(input_graph, input, input_name) and returns: input