code: def _parse_active_learning_scores(scores: Union[np.ndarray, List]):
      """Makes list/np.array of active learning scores serializable."""
      # the api only accepts float64s
      if isinstance(scores, np.ndarray):
          scores = scores.astype(np.float64)
  
      # convert to list and return
      return list(scores)
  
file_path: lightly/lightly/api/api_workflow_selection.py
imports: import time
  import warnings
  from typing import Dict, List, Optional, Union
  import numpy
  from numpy.typing import NDArray
  from lightly.active_learning.config.selection_config import SelectionConfig
  from lightly.openapi_generated.swagger_client.models import ActiveLearningScoreCreateRequest, JobState, JobStatusData, SamplingConfig, SamplingConfigStoppingCondition, SamplingCreateRequest, TagData
label_desc: Use image node_id 1 for calling a global function with example usage: _parse_active_learning_scores(scores) and returns: list