@deprecate_kwarg(old_arg_name='<STR_LIT>', new_arg_name='<STR_LIT>')<EOL><INDENT>def copy(self, names=None, dtype=None, levels=None, codes=None,<EOL>deep=False, _set_identity=False, **kwargs):<DEDENT>
name = kwargs.get('<STR_LIT:name>')<EOL>names = self._validate_names(name=name, names=names, deep=deep)<EOL>if deep:<EOL><INDENT>from copy import deepcopy<EOL>if levels is None:<EOL><INDENT>levels = deepcopy(self.levels)<EOL><DEDENT>if codes is None:<EOL><INDENT>codes = deepcopy(self.codes)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if levels is None:<EOL><INDENT>levels = self.levels<EOL><DEDENT>if codes is None:<EOL><INDENT>codes = self.codes<EOL><DEDENT><DEDENT>return MultiIndex(levels=levels, codes=codes, names=names,<EOL>sortorder=self.sortorder, verify_integrity=False,<EOL>_set_identity=_set_identity)<EOL>
Make a copy of this object. Names, dtype, levels and codes can be
passed and will be set on new copy.

Parameters
----------
names : sequence, optional
dtype : numpy dtype or pandas type, optional
levels : sequence, optional
codes : sequence, optional

Returns
-------
copy : MultiIndex

Notes
-----
In most cases, there should be no functional difference from using
``deep``, but if ``deep`` is passed it will attempt to deepcopy.
This could be potentially expensive on large MultiIndex objects.