code: def decode_feature_type_ndarray(df, schema):
      for n, field in schema.items():
          if field.feature_type == FeatureType.NDARRAY:
              df[n] = df[n].map(lambda k: decode_ndarray(k))
      return df
  
imports: from collections import namedtuple
  from io import BytesIO
  import numpy
  from itertools import chain, islice
  from enum import Enum
  import json
  from bigdl.dllib.utils.log4Error import *
  from typing import Any, Dict, Iterator, List, Union, TYPE_CHECKING
label_desc: Use image node_id 8 for calling a global function with example usage: decode_feature_type_ndarray(df, schema) and returns: df