A Certain Transformation on Metric Spaces