An approach for transparent and electrically conducting coatings