def _validate_names(self, name=None, names=None, deep=False):
from copy import deepcopy<EOL>if names is not None and name is not None:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>elif names is None and name is None:<EOL><INDENT>return deepcopy(self.names) if deep else self.names<EOL><DEDENT>elif names is not None:<EOL><INDENT>if not is_list_like(names):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>return names<EOL><DEDENT>else:<EOL><INDENT>if not is_list_like(name):<EOL><INDENT>return [name]<EOL><DEDENT>return name<EOL><DEDENT>
Handles the quirks of having a singular 'name' parameter for general
Index and plural 'names' parameter for MultiIndex.