def METHOD_NAME(device_type, params):
    """
    Get device settings
    :param device_type: device type, eg. disk
    :param params: Test Dictionary with the test parameters
    :return: Device attrs and it's seclabel attrs
    """
    seclabel_attr = {k.replace('seclabel_attr_', ''): int(v) if v.isdigit()
                     else v for k, v in params.items()
                     if k.startswith('seclabel_attr_')}
    if device_type == "disk":
        new_image_path = data_dir.get_data_dir() + '/test.img'
        libvirt_disk.create_disk("file", new_image_path, disk_format="qcow2")
        dev_dict = eval(params.get("disk_attrs", "{}"))
        dev_dict.update({'source': {'attrs': {'file': new_image_path},
                                    'seclabels': [seclabel_attr]}})
    else:
        dev_dict = eval(params.get("serial_attrs", "{}"))
        dev_dict.update({'sources': [{"attrs": eval(
            params.get("serial_attrs_sources_attrs", "{}")),
                                      'seclabels': [seclabel_attr]}]})
    return dev_dict, seclabel_attr