code: def nullable(val, cast):
      if val is None:
          return None
      else:
          return cast(val)
  
file_path: Fiona/fiona/fio/helpers.py
imports: from functools import partial
  import json
  import math
  import warnings
  from fiona.model import Geometry, to_dict
  from fiona._vendor.munch import munchify
label_desc: Use image node_id 2 for calling a global function with example usage: nullable(val, cast) and returns: None, cast