class_docstr: Mixin for user-defined rolling-window Terms.
  
  Implements `_compute` in terms of a user-defined `compute` function, which
  is mapped over the input windows.
  
  Used by CustomFactor, CustomFilter, CustomClassifier, etc.
docstr: Allocate an output array whose rows should be passed to `self.compute`.
  
  The resulting array must have a shape of ``shape``.
  
  If we have standard outputs (i.e. self.outputs is NotSpecified), the
  default is an empty ndarray whose dtype is ``self.dtype``.
  
  If we have an outputs tuple, the default is an empty recarray with
  ``self.outputs`` as field names. Each field will have dtype
  ``self.dtype``.
  
  This can be overridden to control the kind of array constructed
  (e.g. to produce a LabelArray instead of an ndarray).
docstr_tok: ["Allocate","an","output","array","whose","rows","should","be","passed","to","`","self.compute","`",".","The","resulting","array","must","have","a","shape","of","``","shape","``",".","If","we","have","standard","outputs","(","i.e",".","self.outputs","is","NotSpecified",")",",","the","default","is","an","empty","ndarray","whose","dtype","is","``","self.dtype","``",".","If","we","have","an","outputs","tuple",",","the","default","is","an","empty","recarray","with","``","self.outputs","``","as","field","names",".","Each","field","will","have","dtype","``","self.dtype","``",".","This","can","be","overridden","to","control","the","kind","of","array","constructed","(","e.g",".","to","produce","a","LabelArray","instead","of","an","ndarray",")","."]
code: def _allocate_output(self, windows, shape):
      """
      Allocate an output array whose rows should be passed to `self.compute`.
  
      The resulting array must have a shape of ``shape``.
  
      If we have standard outputs (i.e. self.outputs is NotSpecified), the
      default is an empty ndarray whose dtype is ``self.dtype``.
  
      If we have an outputs tuple, the default is an empty recarray with
      ``self.outputs`` as field names. Each field will have dtype
      ``self.dtype``.
  
      This can be overridden to control the kind of array constructed
      (e.g. to produce a LabelArray instead of an ndarray).
      """
      missing_value = self.missing_value
      outputs = self.outputs
      if outputs is not NotSpecified:
          out = recarray(
              shape,
              formats=[self.dtype.str] * len(outputs),
              names=outputs,
          )
          out[:] = missing_value
      else:
          out = full(shape, missing_value, dtype=self.dtype)
      return out
  
imports: from textwrap import dedent
  from numpy import array, full, recarray, vstack
  from pandas import NaT
  from catalyst.errors import WindowLengthNotPositive, UnsupportedDataType, NoFurtherDataError
  from catalyst.utils.control_flow import nullctx
  from catalyst.utils.input_validation import expect_types
  from catalyst.utils.sharedoc import format_docstring, PIPELINE_ALIAS_NAME_DOC, PIPELINE_DOWNSAMPLING_FREQUENCY_DOC
  from catalyst.utils.pandas_utils import nearest_unequal_elements
  from .downsample_helpers import select_sampling_indices, expect_downsample_frequency
  from .sentinels import NotSpecified
  from .term import Term
label_desc: Use image node_id 3 for calling the CustomTermMixin obj's underlying member method code with example usage: obj._allocate_output(windows, shape) and returns: out