code: def _real_key(self, key):
          
          if key is not None:
              try:
                  return key.lower()
              except AttributeError:
                  raise TypeError(
                      _format("NocaseDict key {0!A} must be a string, "
                              "but is {1}", key, type(key)))
  
          if self.allow_unnamed_keys:
              return None
  
          raise TypeError(
              _format("NocaseDict key None (unnamed key) is not "
                      "allowed for this object"))
docs: Return the normalized key to be used for the internal dictionary,
          from the input key.