Thanks! Can you modify this code so that it calculates the weight of any width/height/length block of any material, with a short dictionary of a few materials with the key as their name and the value as their density? 

Please write it as one function that takes in the material as either a string representing the material or a float representing density, and raise an error if the material string isn't found, or check that the density float is valid.
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence