<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_device(ads, **kwargs):
 """Finds a unique AndroidDevice instance from a list that has specific attributes of certain values. Deprecated, use `get_devices(ads, **kwargs)[0]` instead. This method will be removed in 1.8. Example: get_device(android_devices, label='foo', phone_number='1234567890') get_device(android_devices, model='angler') Args: ads: A list of AndroidDevice instances. kwargs: keyword arguments used to filter AndroidDevice instances. Returns: The target AndroidDevice instance. Raises: Error: None or more than one device is matched. """


    filtered = get_devices(ads, **kwargs)
    if len(filtered) == 1:
        return filtered[0]
    else:
        serials = [ad.serial for ad in filtered]
        raise Error('More than one device matched: %s' % serials)