code: def is_name_in_grace_period(self, name, block_number):
          
          cur = self.db.cursor()
          name_rec = namedb_get_name(cur, name, block_number, include_expired=False)
          if name_rec is None:
              # expired already or doesn't exist
              return False
  
          namespace_id = get_namespace_from_name(name)
          namespace_rec = namedb_get_namespace(cur, namespace_id, block_number, include_history=False)
          if namespace_rec is None:
              return False
  
          grace_info = BlockstackDB.get_name_deadlines(name_rec, namespace_rec, block_number)
          if grace_info is None:
              # namespace isn't ready yet
              return False
  
          return (block_number >= grace_info['expire_block'] and block_number < grace_info['renewal_deadline'])
docs: Given a name and block number, determine if it is in the renewal grace period at that block.
          * names in revealed but not ready namespaces are never expired, unless the namespace itself is expired;
          * names in ready namespaces enter the grace period once max(ready_block, renew_block) + lifetime - grace_period blocks passes
  
          Return True if so
          Return False if not, or if the name does not exist.