<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def namedb_get_name_at(cur, name, block_number, include_expired=False):
 """ Get the sequence of states that a name record was in at a particular block height. There can be more than one if the name changed during the block. Returns only unexpired names by default. Can return expired names with include_expired=True Returns None if this name does not exist at this block height. """

    if not include_expired:
        # don't return anything if this name is expired.
        # however, we don't care if the name hasn't been created as of this block_number either, since we might return its preorder (hence only_registered=False)
        name_rec = namedb_get_name(cur, name, block_number, include_expired=False, include_history=False, only_registered=False)
        if name_rec is None:
            # expired at this block.
            return None

    history_rows = namedb_get_record_states_at(cur, name, block_number)
    if len(history_rows) == 0:
        # doesn't exist
        return None
    else:
        return history_rows