def get(self, get_params, block):
value = "<STR_LIT>" % self.key<EOL>try:<EOL><INDENT>value = value_ = get_params(self.key)<EOL>if self.format.startswith("<STR_LIT::>"):<EOL><INDENT>try:<EOL><INDENT>if "<STR_LIT>" in self.format:<EOL><INDENT>value = int(ceil(float(value)))<EOL><DEDENT>if "<STR_LIT:f>" in self.format:<EOL><INDENT>value = float(value)<EOL><DEDENT>if "<STR_LIT:g>" in self.format:<EOL><INDENT>value = float(value)<EOL><DEDENT>if "<STR_LIT:d>" in self.format:<EOL><INDENT>value = int(float(value))<EOL><DEDENT>output = u"<STR_LIT>" % (self.key, self.format)<EOL>value = output.format({self.key: value})<EOL>value_ = float(value)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>elif self.format.startswith("<STR_LIT:!>"):<EOL><INDENT>output = u"<STR_LIT>" % (self.key, self.format)<EOL>value = value_ = output.format(**{self.key: value})<EOL><DEDENT>if block.commands.not_zero:<EOL><INDENT>valid = value_ not in ["<STR_LIT>", None, False, "<STR_LIT:0>", "<STR_LIT>", <NUM_LIT:0>, <NUM_LIT:0.0>]<EOL><DEDENT>else:<EOL><INDENT>valid = not (value_ in ["<STR_LIT>", None] or value_ is False)<EOL><DEDENT>enough = False<EOL><DEDENT>except:  <EOL><INDENT>enough = True<EOL>valid = False<EOL><DEDENT>return valid, value, enough<EOL>
return the correct value for the placeholder