code: def quantile_series(series, q=0.5, interpolation="linear"):
      """
      Return value at the given quantile.
  
      Parameters
      ----------
      q : float or array-like, default 0.5 (50% quantile)
          0 <= q <= 1, the quantile(s) to compute.
      interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
  
          This optional parameter specifies the interpolation method to use,
          when the desired quantile lies between two data points `i` and `j`:
  
              * linear: `i + (j - i) * fraction`, where `fraction` is the
                fractional part of the index surrounded by `i` and `j`.
              * lower: `i`.
              * higher: `j`.
              * nearest: `i` or `j` whichever is nearest.
              * midpoint: (`i` + `j`) / 2.
  
      Returns
      -------
      float or Series
          If ``q`` is an array or a tensor, a Series will be returned where the
          index is ``q`` and the values are the quantiles, otherwise
          a float will be returned.
  
      See Also
      --------
      core.window.Rolling.quantile
      numpy.percentile
  
      Examples
      --------
      >>> import mars.dataframe as md
      >>> s = md.Series([1, 2, 3, 4])
      >>> s.quantile(.5).execute()
      2.5
      >>> s.quantile([.25, .5, .75]).execute()
      0.25    1.75
      0.50    2.50
      0.75    3.25
      dtype: float64
      """
  
      if isinstance(q, ENTITY_TYPE):
          q = astensor(q)
          q_input = q
      else:
          q_input = None
  
      op = DataFrameQuantile(
          q=q, interpolation=interpolation, gpu=series.op.gpu
      )
      return op(series, q_input=q_input)
  
imports: from collections import OrderedDict
  import numpy
  import pandas
  from ...None import opcodes
  from ...core import ENTITY_TYPE, recursive_tile
  from ...serialization.serializables import KeyField, AnyField, StringField, DataTypeField, BoolField, Int32Field
  from ...tensor.core import TENSOR_TYPE, TENSOR_CHUNK_TYPE
  from ...tensor.datasource import empty, tensor, from_series, from_dataframe
  from ...tensor.statistics.quantile import quantile
  from ..operands import DataFrameOperand, DataFrameOperandMixin
  from ..core import DATAFRAME_TYPE
  from ..datasource.from_tensor import series_from_tensor, dataframe_from_tensor
  from ..initializer import DataFrame
  from ..utils import parse_index, build_empty_df, find_common_type, validate_axis
label_desc: Use image node_id 1 for calling a global function with example usage: quantile_series(series, q, interpolation) and returns: op