<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_names_owned_by_sender( self, sender_pubkey, lastblock=None ):
 """ Get the set of names owned by a particular script-pubkey. """

        cur = self.db.cursor()
        if lastblock is None:
            lastblock = self.lastblock 

        names = namedb_get_names_by_sender( cur, sender_pubkey, lastblock )
        return names