from nz.org.riskscape.engine.types import Nullable

ID = 'one-hazard'
DESCRIPTION = "applies a single hazard to asset"

ARGUMENT_TYPES = ['building', 'nullable-hazard']
RETURN_TYPE = Nullable.INTEGER

def function(asset, hazard):
  if hazard is None:
    return -1
  return asset.get('value') * hazard.get('value')
