class_docstr: Calculates the Spearman rank correlation coefficient of the returns of the
  given asset with the returns of all other assets.
  
  Parameters
  ----------
  target : catalyst.assets.Asset
      The asset to correlate with all other assets.
  returns_length : int >= 2
      Length of the lookback window over which to compute returns. Daily
      returns require a window length of 2.
  correlation_length : int >= 1
      Length of the lookback window over which to compute each correlation
      coefficient.
  mask : catalyst.pipeline.Filter, optional
      A Filter describing which assets should have their correlation with the
      target asset computed each day.
  
  Notes
  -----
  Computing this factor over many assets can be time consuming. It is
  recommended that a mask be used in order to limit the number of assets over
  which correlations are computed.
  
  See Also
  --------
  :class:`catalyst.pipeline.factors.RollingPearsonOfReturns`
  :class:`catalyst.pipeline.factors.RollingLinearRegressionOfReturns`
class_docstr_tok: ["Calculates","the","Spearman","rank","correlation","coefficient","of","the","returns","of","the","given","asset","with","the","returns","of","all","other","assets",".","Parameters","--","--","--","--","--","target",":","catalyst.assets.Asset","The","asset","to","correlate","with","all","other","assets",".","returns_length",":","int",">","=","2","Length","of","the","lookback","window","over","which","to","compute","returns",".","Daily","returns","require","a","window","length","of","2.","correlation_length",":","int",">","=","1","Length","of","the","lookback","window","over","which","to","compute","each","correlation","coefficient",".","mask",":","catalyst.pipeline.Filter",",","optional","A","Filter","describing","which","assets","should","have","their","correlation","with","the","target","asset","computed","each","day",".","Notes","--","--","-","Computing","this","factor","over","many","assets","can","be","time","consuming",".","It","is","recommended","that","a","mask","be","used","in","order","to","limit","the","number","of","assets","over","which","correlations","are","computed",".","See","Also","--","--","--","--",":","class",":","`","catalyst.pipeline.factors.RollingPearsonOfReturns","`",":","class",":","`","catalyst.pipeline.factors.RollingLinearRegressionOfReturns","`"]
code: def __new__(
      cls, target, returns_length, correlation_length, mask=NotSpecified
  ):
      # Use the `SingleAsset` filter here because it protects against
      # inputting a non-existent target asset.
      returns = Returns(
          window_length=returns_length,
          mask=(AssetExists() | SingleAsset(asset=target)),
      )
      return super(RollingSpearmanOfReturns, cls).__new__(
          cls,
          base_factor=returns,
          target=returns[target],
          correlation_length=correlation_length,
          mask=mask,
      )
  
imports: from numpy import broadcast_arrays
  from scipy.stats import linregress, pearsonr, spearmanr
  from catalyst.errors import IncompatibleTerms
  from catalyst.pipeline.factors import CustomFactor
  from catalyst.pipeline.filters import SingleAsset
  from catalyst.pipeline.mixins import SingleInputMixin
  from catalyst.pipeline.sentinels import NotSpecified
  from catalyst.pipeline.term import AssetExists
  from catalyst.utils.input_validation import expect_bounded, expect_dtypes
  from catalyst.utils.numpy_utils import float64_dtype, int64_dtype
  from .technical import Returns
label_desc: Use image node_id 1 for calling the RollingSpearmanOfReturns obj's underlying member method code with example usage: obj.__new__(cls, target, returns_length, correlation_length, mask) and returns: super