refactor: make LinearMap.IsAdjointPair accept bare functions as arguments (#19679)
LinearMap.IsAdjointPair