code: def test_rolling_corr_diff_length():
      # GH 7512
      s1 = Series([1, 2, 3], index=[0, 1, 2])
      s2 = Series([1, 3], index=[0, 2])
      result = s1.rolling(window=3, min_periods=2).corr(s2)
      expected = Series([None, None, 1.0])
      tm.assert_series_equal(result, expected)
  
      s2a = Series([1, None, 3], index=[0, 1, 2])
      result = s1.rolling(window=3, min_periods=2).corr(s2a)
      tm.assert_series_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas.compat import IS64
  from pandas import DataFrame, Index, MultiIndex, Series, date_range
  import pandas._testing
  from pandas.core.algorithms import safe_sort
label_desc: Use image node_id 12 for calling a global function with example usage: test_rolling_corr_diff_length() without return types