docs: public static byte getFlatOpType(Op.Type type) {
          switch (type) {
              case SCALAR:
                  return OpType.SCALAR;
              case SCALAR_BOOL:
                  return OpType.SCALAR_BOOL;
              case BROADCAST:
                  return OpType.BROADCAST;
              case BROADCAST_BOOL:
                  return OpType.BROADCAST_BOOL;
              case TRANSFORM_BOOL:
                  return OpType.TRANSFORM_BOOL;
              case TRANSFORM_FLOAT:
                  return OpType.TRANSFORM_FLOAT;
              case TRANSFORM_SAME:
                  return OpType.TRANSFORM_SAME;
              case TRANSFORM_ANY:
                  return OpType.TRANSFORM_ANY;
              case TRANSFORM_STRICT:
                  return OpType.TRANSFORM_STRICT;
              case SPECIAL:
                  return OpType.TRANSFORM_STRICT;
              case VARIANCE:
              case REDUCE_FLOAT:
                  return OpType.REDUCE_FLOAT;
              case REDUCE_BOOL:
                  return OpType.REDUCE_BOOL;
              case REDUCE_SAME:
                  return OpType.REDUCE_SAME;
              case REDUCE_LONG:
                  return OpType.REDUCE_LONG;
              case REDUCE3:
                  return OpType.REDUCE_3;
              case INDEXREDUCE:
                  return OpType.INDEX_REDUCE;
              case RANDOM:
                  return OpType.RANDOM;
              case MERGE:
              case CONDITIONAL:
              case LOOP:
              case RETURN:
              case ENTER:
              case EXIT:
              case NEXT_ITERATION:
              case LOOP_COND:
              case IF:
                  return OpType.LOGIC;
              case CUSTOM:
                  return OpType.CUSTOM;
              case PAIRWISE:
                  return OpType.PAIRWISE;
              case PAIRWISE_BOOL:
                  return OpType.PAIRWISE_BOOL;
              case SUMMARYSTATS:
                  return OpType.SUMMARYSTATS;
              default:
                  throw new UnsupportedOperationException("Unknown op type passed in: " + type);
          }
      }