Get the expiry and renewal deadlines for a (registered) name.

        NOTE: expire block here is NOT the block at which the owner loses the name, but the block at which lookups fail.
        The name owner has until renewal_deadline to renew the name.

        Return {'expire_block': ..., 'renewal_deadline': ...} on success
        Return None if the namespace isn't ready yet

def get_name_deadlines( self, name_rec, namespace_rec, block_number ):
        """
        Get the expiry and renewal deadlines for a (registered) name.

        NOTE: expire block here is NOT the block at which the owner loses the name, but the block at which lookups fail.
        The name owner has until renewal_deadline to renew the name.

        Return {'expire_block': ..., 'renewal_deadline': ...} on success
        Return None if the namespace isn't ready yet
        """
        if namespace_rec['op'] != NAMESPACE_READY:
            # name cannot be in grace period, since the namespace is not ready 
            return None

        namespace_id = namespace_rec['namespace_id']
        namespace_lifetime_multiplier = get_epoch_namespace_lifetime_multiplier( block_number, namespace_id )
        namespace_lifetime_grace_period = get_epoch_namespace_lifetime_grace_period( block_number, namespace_id )

        expire_block = max(namespace_rec['ready_block'], name_rec['last_renewed']) + (namespace_rec['lifetime'] * namespace_lifetime_multiplier)
        renewal_deadline = expire_block + namespace_lifetime_grace_period

        return {'expire_block': expire_block, 'renewal_deadline': renewal_deadline}