def METHOD_NAME(self):
    for key, error in self.required.items():
        if key not in self:
            sys.stderr.write("Missing parameter: " + key + "\n"
                             + "This is used to set the " + error + "\n")
            raise KeyError