@classmethod<EOL><INDENT>def _valid_name(cls, key):<DEDENT>
return (<EOL>isinstance(key, six.string_types) and<EOL>re.match('<STR_LIT>', key) and<EOL>not hasattr(cls, key)<EOL>)<EOL>
Check whether a key is a valid attribute name.

A key may be used as an attribute if:
 * It is a string
 * It matches /^[A-Za-z][A-Za-z0-9_]*$/ (i.e., a public attribute)
 * The key doesn't overlap with any class attributes (for Attr,
    those would be 'get', 'items', 'keys', 'values', 'mro', and
    'register').