def _is_valid_decimal(self, inpt, metadata):
if not (isinstance(inpt, float) or isinstance(inpt, Decimal)):<EOL><INDENT>return False<EOL><DEDENT>if not isinstance(inpt, Decimal):<EOL><INDENT>inpt = Decimal(str(inpt))<EOL><DEDENT>if metadata.get_minimum_decimal() and inpt < metadata.get_minimum_decimal():<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_maximum_decimal() and inpt > metadata.get_maximum_decimal():<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_decimal_set() and inpt not in metadata.get_decimal_set():<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_decimal_scale() and len(str(inpt).split('<STR_LIT:.>')[-<NUM_LIT:1>]) != metadata.get_decimal_scale():<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
Checks if input is a valid decimal value