def get_prefrosh_and_adjacent(prefrosh_id, prefrosh_list):
  """Returns a prefrosh and the IDs of the neighboring two frosh in the provided list."""
  idx, prefrosh = next(((idx, pf) for idx, pf in enumerate(prefrosh_list)
              if pf['prefrosh_id'] == prefrosh_id))
  prev_id = prefrosh_list[idx - 1]['prefrosh_id'] if idx > 0 else None
  next_id = prefrosh_list[idx + 1]['prefrosh_id'] if idx < len(prefrosh_list) - 1 else None
  return [prefrosh, prev_id, next_id]