code: def median(data_sorted):
      """
      Finds the median value of a given series of values.
  
      :param data_sorted:
          The values to find the median of. Must be sorted.
      """
      length = len(data_sorted)
  
      if length % 2 == 1:
          return data_sorted[((length + 1) // 2) - 1]
  
      half = length // 2
      a = data_sorted[half - 1]
      b = data_sorted[half]
  
      return (a + b) / 2
  
imports: import math
  import string
  from collections import OrderedDict
  from collections.abc import Sequence
  from decimal import ROUND_CEILING, ROUND_FLOOR, Decimal, getcontext
  from functools import wraps
  from slugify import slugify
  from agate import config
  from agate.warns import warn_duplicate_column, warn_unnamed_column
label_desc: Use image node_id 2 for calling a global function with example usage: median(data_sorted) and returns: unknown, data_sorted