class_docstr: Computes the average number of seconds between consecutive events.
  
  Description:
      Given a list of datetimes, return the average time (default in seconds)
      elapsed between consecutive events. If there are fewer
      than 2 non-null values, return `NaN`.
  
  Args:
      unit (str): Defines the unit of time.
          Defaults to seconds. Acceptable values:
          years, months, days, hours, minutes, seconds, milliseconds, nanoseconds
  
  Examples:
      >>> from datetime import datetime
      >>> avg_time_between = AvgTimeBetween()
      >>> times = [datetime(2010, 1, 1, 11, 45, 0),
      ...          datetime(2010, 1, 1, 11, 55, 15),
      ...          datetime(2010, 1, 1, 11, 57, 30)]
      >>> avg_time_between(times)
      375.0
      >>> avg_time_between = AvgTimeBetween(unit="minutes")
      >>> avg_time_between(times)
      6.25
code: def __init__(self, unit="seconds"):
      self.unit = unit.lower()
  
file_path: featuretools/featuretools/primitives/standard/aggregation/avg_time_between.py
imports: from datetime import datetime
  import numpy
  import pandas
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime, Double
  from featuretools.primitives.base.aggregation_primitive_base import AggregationPrimitive
  from featuretools.utils import convert_time_units
  from featuretools.utils.gen_utils import Library
label_desc: Use image node_id 1 to create a new AvgTimeBetween object from inherited base classes: AggregationPrimitive with example: obj = AvgTimeBetween(unit)