code: def add_object_location_measurements_ijv(
      measurements, object_name, ijv, object_count=None
  ):
      """Add object location measurements for IJV-style objects"""
      if object_count is None:
          object_count = (
              0 if ijv.shape[0] == 0 else numpy.max(ijv[:, 2])
          )
      if object_count == 0:
          center_x = numpy.zeros(0)
          center_y = numpy.zeros(0)
      else:
          areas = numpy.zeros(object_count, int)
          areas_bc = numpy.bincount(ijv[:, 2])[1:]
          areas[: len(areas_bc)] = areas_bc
          center_x = numpy.bincount(ijv[:, 2], ijv[:, 1])[1:] / areas
          center_y = numpy.bincount(ijv[:, 2], ijv[:, 0])[1:] / areas
      measurements.add_measurement(
          object_name,
          M_LOCATION_CENTER_X,
          center_x,
      )
      measurements.add_measurement(
          object_name,
          M_LOCATION_CENTER_Y,
          center_y,
      )
      measurements.add_measurement(
          object_name,
          M_NUMBER_OBJECT_NUMBER,
          numpy.arange(1, object_count + 1),
      )
  
imports: import numpy
  import scipy.ndimage
  from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, M_NUMBER_OBJECT_NUMBER, FF_COUNT, COLTYPE_FLOAT, COLTYPE_INTEGER, IMAGE, M_LOCATION_CENTER_Z
label_desc: Use image node_id 2 for calling a global function with example usage: add_object_location_measurements_ijv(measurements, object_name, ijv, object_count) without return types