input: Write a python function to serialize a User object.
  assert serialize(User(id=1, first_name='John', last_name='Doe')) == {'id': 1, 'first_name': 'John', 'last_name': 'Doe'}
  assert serialize(User(id=2, first_name='Jane', last_name='Doe')) == {'id': 2, 'first_name': 'Jane', 'last_name': 'Doe'}
  assert serialize(User(id=3, first_name='Jim', last_name='Beam')) == {'id': 3, 'first_name': 'Jim', 'last_name': 'Beam'}
output: def serialize(user):
      return {
          'id': user.id,
          'first_name': user.first_name,
          'last_name': user.last_name
      }