class_docstr: Abstract interface for data aggregation functionality for plotly figures.
class_docstr_tok: ["Abstract","interface","for","data","aggregation","functionality","for","plotly","figures","."]
docstr: Verify the orjson compatibility of the series and convert it if needed.
docstr_tok: ["Verify","the","orjson","compatibility","of","the","series","and","convert","it","if","needed","."]
code: def _parse_dtype_orjson(series: np.ndarray) -> np.ndarray:
      """Verify the orjson compatibility of the series and convert it if needed."""
      # NOTE:
      #    * float16 and float128 aren't supported with latest orjson versions (3.8.1)
      #    * this method assumes that the it will not get a float128 series
      # -> this method can be removed if orjson supports float16
      if series.dtype == np.float16:
          return series.astype(np.float32)
      return series
  
imports: from __future__ import annotations
  import itertools
  import re
  from abc import ABC
  from collections import namedtuple
  from copy import copy
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  from uuid import uuid4
  import dash
  import numpy
  import pandas
  import plotly.graph_objects
  from pandas.io.json._normalize import nested_to_record
  from plotly.basedatatypes import BaseFigure, BaseTraceType
  from ..aggregation import AbstractAggregator, MedDiffGapHandler, MinMaxLTTB
  from ..aggregation.aggregation_interface import DataPointSelector
  from ..aggregation.gap_handler_interface import AbstractGapHandler
  from ..aggregation.plotly_aggregator_parser import PlotlyAggregatorParser
  from .utils import round_number_str, round_td_str
label_desc: Use image node_id 22 for calling the AbstractFigureAggregator obj's underlying member method code with example usage: obj._parse_dtype_orjson(series) and returns: series, series