code: def make_null_mask(array):
      """Given a numpy array, return a numpy array of int64s containing the
      indices of `array` where the value is either invalid or null.
  
      Invalid values are:
          - None
          - numpy.nat
          - numpy.nan
  
      Args:
          array (:obj:`numpy.array`)
      """
      mask = []
  
      is_object_or_string_dtype = np.issubdtype(
          array.dtype, np.str_
      ) or np.issubdtype(array.dtype, np.object_)
  
      is_datetime_dtype = np.issubdtype(
          array.dtype, np.datetime64
      ) or np.issubdtype(array.dtype, np.timedelta64)
  
      for i, item in enumerate(array):
          invalid = item is None
  
          if not is_object_or_string_dtype:
              if is_datetime_dtype:
                  invalid = invalid or str(item) == "NaT"
              else:
                  invalid = invalid or np.isnan(item)
  
          if invalid:
              mask.append(i)
  
      return mask
  
label_desc: Use image node_id 1 for calling a global function with example usage: make_null_mask(array) and returns: mask