code: def namedb_namespace_fields_check( namespace_rec ):
      
  
      assert namespace_rec.has_key('namespace_id'), "BUG: namespace record has no ID"
      assert namespace_rec.has_key('buckets'), 'BUG: missing price buckets'
      assert isinstance(namespace_rec['buckets'], str), 'BUG: namespace data is not in canonical form'
  
      return namespace_rec
docs: Given a namespace record, make sure the following fields are present:
      * namespace_id
      * buckets
  
      Makes the record suitable for insertion/update.
      NOTE: MODIFIES namespace_rec