The Nazi-Soviet pact was essentially, “Don’t bother us and we won’t bother you.” It was a neutrality agreement. This is similar to the treaty that formed the Axis because Germany and Italy also signed a neutrality agreement in this treaty.
Hope this helps! Good luck :)
They are alike insofar that they both deal with with people from minorities and and the discrimination against people who were not of European descent. In Mendez v. Westminster it was about Mexican American people while in the Magnuson Act it was about the Chinese American population and discrimination against them.