code: def validate_price(price):
  	
  	if isinstance(price, str):
  		try:
  			price = int(price)
  		except ValueError: # fallback if convert to int failed
  			price = float(price)
  	if not isinstance(price, (int, float)):
  		raise TypeError('Price should be a number: ' + repr(price))
  	return price
docs: validation checks for price argument