code: def bin_column(series: Series, bins, dtype):
      return np.digitize(series, bins=bins, right=True).astype(dtype)
  
imports: import logging
  import numpy
  import pandas
  from pandas import DataFrame, IntervalIndex, Series
label_desc: Use image node_id 1 for calling a global function with example usage: bin_column(series, bins, dtype) and returns: np