<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_segment_dcnm(self, cfg, seg_id_min, seg_id_max):
 """Register segmentation id pool with DCNM. """


        orch_id = cfg.dcnm.orchestrator_id
        try:
            segid_range = self.dcnm_client.get_segmentid_range(orch_id)
            if segid_range is None:
                self.dcnm_client.set_segmentid_range(orch_id, seg_id_min,
                                                     seg_id_max)
            else:
                conf_min, _, conf_max = segid_range[
                    "segmentIdRanges"].partition("-")
                if int(conf_min) != seg_id_min or int(conf_max) != seg_id_max:
                    self.dcnm_client.update_segmentid_range(orch_id,
                                                            seg_id_min,
                                                            seg_id_max)
        except dexc.DfaClientRequestFailed as exc:
            LOG.error("Segment ID range could not be created/updated"
                      " on DCNM: %s", exc)
            raise SystemExit(exc)