from nz.org.riskscape.engine.types import Types, Struct
ID = 'fire_py'
ARGUMENT_TYPES = [
    Types.ANYTHING,
    Struct.of("intensity", Types.FLOATING, "speed", Types.FLOATING)
]
RETURN_TYPE = Struct.of("strength", Types.FLOATING, "loss", Types.FLOATING)

def function(building, fire):
    return {
      "strength": fire['speed'] * fire['intensity'],
      "loss": building['value'] * fire['speed'] * fire['intensity']
    }
