def to_sensor_db_model(sensor_api_model=None):
    class_name = getattr(sensor_api_model, 'class_name', None)
    pack = getattr(sensor_api_model, 'pack', None)
    entry_point = get_sensor_entry_point(sensor_api_model)
    artifact_uri = getattr(sensor_api_model, 'artifact_uri', None)
    description = getattr(sensor_api_model, 'description', None)
    trigger_types = getattr(sensor_api_model, 'trigger_types', [])
    poll_interval = getattr(sensor_api_model, 'poll_interval', None)
    enabled = getattr(sensor_api_model, 'enabled', True)

    poll_interval = getattr(sensor_api_model, 'poll_interval', None)
    if poll_interval and (poll_interval < MINIMUM_POLL_INTERVAL):
        raise ValueError('Minimum possible poll_interval is %s seconds' %
                         (MINIMUM_POLL_INTERVAL))

    # Add pack to each trigger type item
    for trigger_type in trigger_types:
        trigger_type['pack'] = pack
    trigger_type_refs = _create_trigger_types(trigger_types)

    return _create_sensor_type(pack=pack,
                               name=class_name,
                               description=description,
                               artifact_uri=artifact_uri,
                               entry_point=entry_point,
                               trigger_types=trigger_type_refs,
                               poll_interval=poll_interval,
                               enabled=enabled)
Scale the input data so that the range old_min-old_max maps to
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/models/utils/sensor_type_utils.py/to_sensor_db_model--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/_internal/graphy/backends/google_chart_api/util.py/ScaleData