code: def convert_to_num(Ybin: np.ndarray) -> np.ndarray:
      """
      Convert binary targets to numeric vector
      typically classification target values
      :param Ybin:
      :return:
      """
      result = np.array(Ybin)
      if len(Ybin.shape) != 1:
          result = np.dot(Ybin, range(Ybin.shape[1]))
      return result
  
imports: from typing import Any, Dict, Iterator, List, Mapping, Optional, Sequence, Tuple, Type, Union, cast
  import warnings
  import numpy
  import pandas
  from scipy.sparse import spmatrix
  from sklearn.model_selection import train_test_split
  from autosklearn.evaluation.splitter import CustomStratifiedShuffleSplit
label_desc: Use image node_id 4 for calling a global function with example usage: convert_to_num(Ybin) and returns: result