Anomalous quantum transport through a thin film of varying impurity density with the distance from the film surface