code: def format_last_online(last_online):
      
      if isinstance(last_online, str):
          if last_online.lower() in ('day', 'today'):
              last_online_int = 86400  # 3600 * 24
          elif last_online.lower() == 'week':
              last_online_int = 604800  # 3600 * 24 * 7
          elif last_online.lower() == 'month':
              last_online_int = 2678400  # 3600 * 24 * 31
          elif last_online.lower() == 'year':
              last_online_int = 31536000  # 3600 * 365
          elif last_online.lower() == 'decade':
              last_online_int = 315360000  # 3600 * 365 * 10
          else: # Defaults any other strings to last hour
              last_online_int = 3600
      else:
          last_online_int = last_online
      return last_online_int
docs: Return the upper limit in seconds that a profile may have been
      online. If last_online is an int, return that int. Otherwise if
      last_online is a str, convert the string into an int.
      Returns
      ----------
      int