def create_migration(self, repos, lock_repositories=github.GithubObject.NotSet, exclude_attachments=github.GithubObject.NotSet):
assert isinstance(repos, (list, tuple)), repos<EOL>assert all(isinstance(repo, (str, unicode)) for repo in repos), repos<EOL>assert lock_repositories is github.GithubObject.NotSet or isinstance(lock_repositories, bool), lock_repositories<EOL>assert exclude_attachments is github.GithubObject.NotSet or isinstance(exclude_attachments, bool), exclude_attachments<EOL>post_parameters = {<EOL>"<STR_LIT>": repos<EOL>}<EOL>if lock_repositories is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = lock_repositories<EOL><DEDENT>if exclude_attachments is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = exclude_attachments<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT:POST>",<EOL>"<STR_LIT>",<EOL>input=post_parameters,<EOL>headers={<EOL>"<STR_LIT>": Consts.mediaTypeMigrationPreview<EOL>}<EOL>)<EOL>return github.Migration.Migration(self._requester, headers, data, completed=True)<EOL>
:calls: `POST /user/migrations`_
:param repos: list or tuple of str
:param lock_repositories: bool
:param exclude_attachments: bool
:rtype: :class:`github.Migration.Migration`