function getTransformFromProjections(source, destination) {
  const sourceCode = source.getCode();
  const destinationCode = destination.getCode();
  let transformFunc = getTransformFunc(sourceCode, destinationCode);
  if (transformFunc) {
    return transformFunc;
  }

  /**
   * @type {Transforms|null}
   */
  let sourceTransforms = null;

  /**
   * @type {Transforms|null}
   */
  let destinationTransforms = null;

  // lazily add projections if we have supported transforms
  for (const makeTransforms of transformFactories) {
    if (!sourceTransforms) {
      sourceTransforms = makeTransforms(source);
    }
    if (!destinationTransforms) {
      destinationTransforms = makeTransforms(destination);
    }
  }

  if (!sourceTransforms && !destinationTransforms) {
    return null;
  }

  const intermediateCode = 'EPSG:4326';
  if (!destinationTransforms) {
    const toDestination = getTransformFunc(intermediateCode, destinationCode);
    if (toDestination) {
      transformFunc = composeTransformFuncs(
        sourceTransforms.inverse,
        toDestination,
      );
    }
  } else if (!sourceTransforms) {
    const fromSource = getTransformFunc(sourceCode, intermediateCode);
    if (fromSource) {
      transformFunc = composeTransformFuncs(
        fromSource,
        destinationTransforms.forward,
      );
    }
  } else {
    transformFunc = composeTransformFuncs(
      sourceTransforms.inverse,
      destinationTransforms.forward,
    );
  }

  if (transformFunc) {
    addProjection(source);
    addProjection(destination);
    addTransformFunc(source, destination, transformFunc);
  }

  return transformFunc;
}
Searches in the list of transform functions for the function for converting
coordinates from the source projection to the destination projection.

@param {Projection} source Source Projection object.
@param {Projection} destination Destination Projection
    object.
@return {TransformFunction|null} Transform function.