code: def _validate_cutoff_time(
      cutoff_time: CutoffTimeType,
      target_dataframe,
  ):
      """
      Verify that the cutoff time is a single value or a pandas dataframe with the proper columns
      containing no duplicate rows
      """
      if is_instance(cutoff_time, dd, "DataFrame"):
          msg = (
              "cutoff_time should be a Pandas DataFrame: "
              "computing cutoff_time, this may take a while"
          )
          warnings.warn(msg)
          cutoff_time = cutoff_time.compute()
  
      if isinstance(cutoff_time, pd.DataFrame):
          cutoff_time = cutoff_time.reset_index(drop=True)
  
          if "instance_id" not in cutoff_time.columns:
              if target_dataframe.ww.index not in cutoff_time.columns:
                  raise AttributeError(
                      "Cutoff time DataFrame must contain a column with either the same name"
                      ' as the target dataframe index or a column named "instance_id"',
                  )
              # rename to instance_id
              cutoff_time.rename(
                  columns={target_dataframe.ww.index: "instance_id"},
                  inplace=True,
              )
  
          if "time" not in cutoff_time.columns:
              if (
                  target_dataframe.ww.time_index
                  and target_dataframe.ww.time_index
                  not in cutoff_time.columns
              ):
                  raise AttributeError(
                      "Cutoff time DataFrame must contain a column with either the same name"
                      ' as the target dataframe time_index or a column named "time"',
                  )
              # rename to time
              cutoff_time.rename(
                  columns={target_dataframe.ww.time_index: "time"},
                  inplace=True,
              )
  
          # Make sure user supplies only one valid name for instance id and time columns
          if (
              "instance_id" in cutoff_time.columns
              and target_dataframe.ww.index in cutoff_time.columns
              and "instance_id" != target_dataframe.ww.index
          ):
              raise AttributeError(
                  'Cutoff time DataFrame cannot contain both a column named "instance_id" and a column'
                  " with the same name as the target dataframe index",
              )
          if (
              "time" in cutoff_time.columns
              and target_dataframe.ww.time_index in cutoff_time.columns
              and "time" != target_dataframe.ww.time_index
          ):
              raise AttributeError(
                  'Cutoff time DataFrame cannot contain both a column named "time" and a column'
                  " with the same name as the target dataframe time index",
              )
  
          assert (
              cutoff_time[["instance_id", "time"]].duplicated().sum()
              == 0
          ), "Duplicated rows in cutoff time dataframe."
      if isinstance(cutoff_time, str):
          try:
              cutoff_time = pd.to_datetime(cutoff_time)
          except ValueError as e:
              raise ValueError(f"While parsing cutoff_time: {str(e)}")
          except OverflowError as e:
              raise OverflowError(
                  f"While parsing cutoff_time: {str(e)}"
              )
      else:
          if isinstance(cutoff_time, list):
              raise TypeError(
                  "cutoff_time must be a single value or DataFrame"
              )
  
      return cutoff_time
  
imports: import logging
  import os
  import typing
  import warnings
  from datetime import datetime
  from functools import wraps
  import numpy
  import pandas
  import psutil
  from woodwork.logical_types import Datetime, Double
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.feature_base import AggregationFeature, DirectFeature
  from featuretools.utils import Trie
  from featuretools.utils.gen_utils import Library, import_or_none, is_instance
  from featuretools.utils.wrangle import _check_time_type, _check_timedelta
label_desc: Use image node_id 9 for calling a global function with example usage: _validate_cutoff_time(cutoff_time, target_dataframe) and returns: cutoff_time