parameters: (pre, post, projections)
docstring: Connect `pre` to `post` using the specifications in `projections` with the SLI function `ConnectLayers`.
docstring_summary: Connect `pre` to `post` using the specifications in `projections` with the SLI function `ConnectLayers`.
docstring_tokens: Connect pre to post using the specifications in projections with the SLI function ConnectLayers .
function: def _connect_spatial(pre, post, projections):
      """Connect `pre` to `post` using the specifications in `projections` with the SLI function `ConnectLayers`."""
      # Replace python classes with SLI datums
      def fixdict(d):
          d = d.copy()
          for k, v in d.items():
              if isinstance(v, dict):
                  d[k] = fixdict(v)
              elif isinstance(v, Mask) or isinstance(v, Parameter):
                  d[k] = v._datum
          return d
  
      projections = fixdict(projections)
      sps(projections)
      sr('ConnectLayers')
function_tokens: def _connect_spatial ( pre , post , projections ) : # Replace python classes with SLI datums def fixdict ( d ) : d = d . copy ( ) for k , v in d . items ( ) : if isinstance ( v , dict ) : d [ k ] = fixdict ( v ) elif isinstance ( v , Mask ) or isinstance ( v , Parameter ) : d [ k ] = v . _datum return d projections = fixdict ( projections ) sps ( projections ) sr ( 'ConnectLayers' )