<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get(account_id, account_type_id=None):
 """Return account by ID and type Args: account_id (`int`, `str`):
 Unique Account identifier account_type_id (str):
 Type of account to get Returns: :obj:`Account`: Returns an Account object if found, else None """

        if type(account_id) == str:
            args = {'account_name': account_id}
        else:
            args = {'account_id': account_id}

        if account_type_id:
            args['account_type_id'] = account_type_id

        return db.Account.find_one(**args)