public function migrate( $args, $assoc_args ) {
		$term_reference       = $args[0];
		$original_taxonomy    = Utils\get_flag_value( $assoc_args, 'from' );
		$destination_taxonomy = Utils\get_flag_value( $assoc_args, 'to' );

		$term = get_term_by( Utils\get_flag_value( $assoc_args, 'by' ), $term_reference, $original_taxonomy );

		if ( ! $term ) {
			WP_CLI::error( "Taxonomy term '{$term_reference}' for taxonomy '{$original_taxonomy}' doesn't exist." );
		}

		$original_taxonomy = get_taxonomy( $original_taxonomy );

		$id = wp_insert_term(
			$term->name,
			$destination_taxonomy,
			[
				'slug'        => $term->slug,
				'parent'      => 0,
				'description' => $term->description,
			]
		);

		if ( is_wp_error( $id ) ) {
			WP_CLI::error( $id->get_error_message() );
		}

		$post_ids = get_objects_in_term( $term->term_id, $original_taxonomy->name );

		foreach ( $post_ids as $post_id ) {
			$type = get_post_type( $post_id );
			if ( in_array( $type, $original_taxonomy->object_type, true ) ) {
				$term_taxonomy_id = wp_set_object_terms( $post_id, $id['term_id'], $destination_taxonomy, true );

				if ( is_wp_error( $term_taxonomy_id ) ) {
					WP_CLI::error( "Failed to assign the term '{$term->slug}' to the post {$post_id}. Reason: " . $term_taxonomy_id->get_error_message() );
				}

				WP_CLI::log( "Term '{$term->slug}' assigned to post {$post_id}." );
			}

			clean_post_cache( $post_id );
		}

		clean_term_cache( $term->term_id );

		WP_CLI::log( "Term '{$term->slug}' migrated." );

		$del = wp_delete_term( $term->term_id, $original_taxonomy->name );

		if ( is_wp_error( $del ) ) {
			WP_CLI::error( "Failed to delete the term '{$term->slug}'. Reason: " . $del->get_error_message() );
		}

		WP_CLI::log( "Old instance of term '{$term->slug}' removed from its original taxonomy." );
		$post_count  = count( $post_ids );
		$post_plural = Utils\pluralize( 'post', $post_count );
		WP_CLI::success( "Migrated the term '{$term->slug}' from taxonomy '{$original_taxonomy->name}' to taxonomy '{$destination_taxonomy}' for {$post_count} {$post_plural}." );
	}