docs: def get_user_name(user, full_name=True):
      """Return the user's name as a string.
  
      :param user: `models.User` object. The user to get the name of.
      :param full_name: (optional) Whether to return full user name, or just first name.
      :return: The user's name.
      """ # noqa
      try:
          if full_name:
              name = ' '.join([user.first_name, user.last_name])
          else:
              name = user.first_name
      except AttributeError:
          name = None
  
      return name