def _expand_dict(d, keylist):
  for k in keylist[:-1]:
    if d not in k or not isinstance(d[k], dict):
      d[k] = {} 
    d = d[k]
  return d
dataset/ETHPy150Open benrady/roost/roost/properties.py/_expand_dict/swapped operands of `not in`