class_docstr: Calculates the Spearman rank correlation coefficient of the returns of the
  given asset with the returns of all other assets.
  
  Parameters
  ----------
  target : zipline.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 : zipline.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:`zipline.pipeline.factors.RollingPearsonOfReturns`
  :class:`zipline.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",":","zipline.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",":","zipline.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",":","`","zipline.pipeline.factors.RollingPearsonOfReturns","`",":","class",":","`","zipline.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 numexpr import evaluate
  import numpy
  from numpy import broadcast_arrays
  from scipy.stats import linregress, spearmanr
  from zipline.assets import Asset
  from zipline.errors import IncompatibleTerms
  from zipline.pipeline.factors import CustomFactor
  from zipline.pipeline.filters import SingleAsset
  from zipline.pipeline.mixins import StandardOutputs
  from zipline.pipeline.sentinels import NotSpecified
  from zipline.pipeline.term import AssetExists
  from zipline.utils.input_validation import expect_bounded, expect_dtypes, expect_types
  from zipline.utils.math_utils import nanmean
  from zipline.utils.numpy_utils import float64_dtype, int64_dtype
  from .basic 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