class_docstr: Base class for terms in a Pipeline API compute graph.
class_docstr_tok: ["Base","class","for","terms","in","a","Pipeline","API","compute","graph","."]
docstr: Calculate the number of extra rows needed to compute ``self``.
  
  Must return at least ``min_extra_rows``, and the default implementation
  is to just return ``min_extra_rows``.  This is overridden by
  downsampled terms to ensure that the first date computed is a
  recomputation date.
  
  Parameters
  ----------
  all_dates : pd.DatetimeIndex
      The trading sessions against which ``self`` will be computed.
  start_date : pd.Timestamp
      The first date for which final output is requested.
  end_date : pd.Timestamp
      The last date for which final output is requested.
  min_extra_rows : int
      The minimum number of extra rows required of ``self``, as
      determined by other terms that depend on ``self``.
  
  Returns
  -------
  extra_rows : int
      The number of extra rows to compute.  Must be at least
      ``min_extra_rows``.
docstr_tok: ["Calculate","the","number","of","extra","rows","needed","to","compute","``","self","``",".","Must","return","at","least","``","min_extra_rows","``",",","and","the","default","implementation","is","to","just","return","``","min_extra_rows","``",".","This","is","overridden","by","downsampled","terms","to","ensure","that","the","first","date","computed","is","a","recomputation","date",".","Parameters","--","--","--","--","--","all_dates",":","pd.DatetimeIndex","The","trading","sessions","against","which","``","self","``","will","be","computed",".","start_date",":","pd.Timestamp","The","first","date","for","which","final","output","is","requested",".","end_date",":","pd.Timestamp","The","last","date","for","which","final","output","is","requested",".","min_extra_rows",":","int","The","minimum","number","of","extra","rows","required","of","``","self","``",",","as","determined","by","other","terms","that","depend","on","``","self","``",".","Returns","--","--","--","-","extra_rows",":","int","The","number","of","extra","rows","to","compute",".","Must","be","at","least","``","min_extra_rows","``","."]
code: def compute_extra_rows(
      self, all_dates, start_date, end_date, min_extra_rows
  ):
      """
      Calculate the number of extra rows needed to compute ``self``.
  
      Must return at least ``min_extra_rows``, and the default implementation
      is to just return ``min_extra_rows``.  This is overridden by
      downsampled terms to ensure that the first date computed is a
      recomputation date.
  
      Parameters
      ----------
      all_dates : pd.DatetimeIndex
          The trading sessions against which ``self`` will be computed.
      start_date : pd.Timestamp
          The first date for which final output is requested.
      end_date : pd.Timestamp
          The last date for which final output is requested.
      min_extra_rows : int
          The minimum number of extra rows required of ``self``, as
          determined by other terms that depend on ``self``.
  
      Returns
      -------
      extra_rows : int
          The number of extra rows to compute.  Must be at least
          ``min_extra_rows``.
      """
      return min_extra_rows
  
imports: from abc import ABCMeta, abstractproperty
  from bisect import insort
  from collections import Mapping
  from weakref import WeakValueDictionary
  from numpy import array, dtype, ndarray, searchsorted
  from six import with_metaclass
  from catalyst.assets import Asset
  from catalyst.errors import DTypeNotSpecified, InvalidOutputName, NonExistentAssetInTimeFrame, NonSliceableTerm, NonWindowSafeInput, NotDType, TermInputsNotSpecified, TermOutputsEmpty, UnsupportedDType, WindowLengthNotSpecified
  from catalyst.lib.adjusted_array import can_represent_dtype
  from catalyst.lib.labelarray import LabelArray
  from catalyst.utils.input_validation import expect_types
  from catalyst.utils.memoize import lazyval
  from catalyst.utils.numpy_utils import bool_dtype, categorical_dtype, datetime64ns_dtype, default_missing_value_for_dtype
  from catalyst.utils.sharedoc import templated_docstring, PIPELINE_ALIAS_NAME_DOC, PIPELINE_DOWNSAMPLING_FREQUENCY_DOC
  from .downsample_helpers import expect_downsample_frequency
  from .sentinels import NotSpecified
label_desc: Use image node_id 8 for calling the Term obj's underlying member method code with example usage: obj.compute_extra_rows(all_dates, start_date, end_date, min_extra_rows) and returns: min_extra_rows