def get_method(ioctl_code):
    """Returns the correct method type name for a 32 bit IOCTL code"""
    
    method_names = [
        'METHOD_BUFFERED',
        'METHOD_IN_DIRECT',
        'METHOD_OUT_DIRECT',
        'METHOD_NEITHER',
    ]
    method = ioctl_code & 3
    return method_names[method], method