

def _expected_cols(expected_attrs):
    'Return expected_attrs that are columns needing joining.\n\n    NB: This function may modify expected_attrs if one\n    requested attribute requires another.\n    '
    if (not expected_attrs):
        return expected_attrs
    simple_cols = [attr for attr in expected_attrs if (attr in _INSTANCE_OPTIONAL_JOINED_FIELDS)]
    complex_cols = [('extra.%s' % field) for field in _INSTANCE_EXTRA_FIELDS if (field in expected_attrs)]
    if complex_cols:
        simple_cols.append('extra')
    simple_cols = [x for x in complex_cols if (x not in _INSTANCE_EXTRA_FIELDS)]
    return (simple_cols + complex_cols)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py _expected_cols/VarMisuse@80/175 `simple_cols`->`complex_cols`