code: def series_handle_nulls(
      fn: Callable[..., bool]
  ) -> Callable[..., bool]:
      """Decorator for nullable series"""
  
      @wraps(fn)
      def inner(
          series: pd.Series, state: dict, *args, **kwargs
      ) -> bool:
          if "hasnans" not in state:
              state["hasnans"] = series.hasnans
  
          if state["hasnans"]:
              series = series.dropna()
              if series.empty:
                  return False
  
          return fn(series, state, *args, **kwargs)
  
      return inner
  
imports: import datetime
  import imghdr
  import os
  import warnings
  from functools import partial, wraps
  from typing import Callable, Sequence, Set
  from urllib.parse import urlparse
  import pandas
  import visions
  from multimethod import multimethod
  from pandas.api import types
  from visions.backends.pandas.series_utils import series_not_empty
  from visions.relations import IdentityRelation, InferenceRelation, TypeRelation
  from ydata_profiling.config import Settings
  from ydata_profiling.model.typeset_relations import numeric_is_category, series_is_string, string_is_bool, string_is_category, string_is_datetime, string_is_numeric, string_to_bool, string_to_datetime, string_to_numeric, to_bool, to_category
label_desc: Use image node_id 1 for calling a global function with example usage: series_handle_nulls(fn) and returns: inner, fn, False