code: def cases(arg, case_result_pairs, default=None):
      
      builder = arg.case()
      for case, result in case_result_pairs:
          builder = builder.when(case, result)
      if default is not None:
          builder = builder.else_(default)
      return builder.end()
docs: Create a case expression in one shot.
  
      Returns
      -------
      case_expr : SimpleCase