code: def partition_numeric_feature_around_segment(
      column: pd.Series,
      segment: List[float],
      max_additional_segments: int = 4,
  ) -> np.ndarray:
      """Split given series into segments containing specified segment.
  
      Tries to create segments as balanced as possible in size.
      Parameters
      ----------
      column : pd.Series
          Series to be partitioned.
      segment : List[float]
          Segment to be included in the partition.
      max_additional_segments : int, default = 4
          Maximum number of segments to be returned (not including the original segment).
      """
      data_below_segment, data_above_segment = (
          column[column <= segment[0]],
          column[column > segment[1]],
      )
      if len(data_below_segment) + len(data_above_segment) == 0:
          return np.array([np.nanmin(column), np.nanmax(column)])
      ratio = np.divide(
          len(data_below_segment),
          len(data_below_segment) + len(data_above_segment),
      )
  
      if len(data_below_segment) == 0:
          segments_below = np.array([np.nanmin(column)])
      elif data_below_segment.nunique() == 1:
          segments_below = np.array([np.nanmin(column), segment[0]])
      else:
          segments_below = numeric_segmentation_edges(
              data_below_segment, round(max_additional_segments * ratio)
          )
          segments_below = np.append(
              np.delete(segments_below, len(segments_below) - 1),
              segment[0],
          )
  
      if len(data_above_segment) == 0:
          segments_above = np.array([np.nanmax(column)])
      elif data_above_segment.nunique() == 1:
          segments_above = np.array([segment[1], np.nanmax(column)])
      else:
          segments_above = numeric_segmentation_edges(
              data_above_segment,
              round(max_additional_segments * (1 - ratio)),
          )
          segments_above = np.append(
              segment[1], np.delete(segments_above, 0)
          )
  
      return np.unique(
          np.concatenate([segments_below, segments_above], axis=None)
      )
  
imports: from collections import defaultdict
  from copy import deepcopy
  from typing import Callable, List, Optional, Tuple, Union
  import numpy
  import pandas
  from sklearn.tree import _tree
  from deepchecks.tabular.dataset import Dataset
  from deepchecks.utils.strings import format_number
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 2 for calling a global function with example usage: partition_numeric_feature_around_segment(column, segment, max_additional_segments) and returns: np, np