def aws_to_torch(settings, key: str) ->str:
    """
    Impute libtorch specific type from user provided "human-readable" form.

    See `type_mapping` in source code for exact mapping.

    Parameters
    ----------
    settings : typing.Dict
        YAML parsed to dict

    Returns
    -------
    str:
        String specifying type, e.g. "torch::kFloat16"
    """
    type_mapping = {'bool': 'torch::kInt8', 'int': 'torch::kInt32', 'long':
        'torch::kInt64', 'double': 'torch::kFloat64'}
    if settings['return'][key] is None:
        return ''
    return type_mapping[settings['return'][key]['type'].lower()]
