code: def test_diff_pip_requirements():
      # Order in requirements file should not matter
      _shuffled = REQUIREMENT_FILE_BASIC.copy()
      random.shuffle(_shuffled)
      diff = diff_pip_requirements(REQUIREMENT_FILE_BASIC, _shuffled)
      assert not diff
  
      # Empty requirements file should parse fine, but appear in diff
      diff = diff_pip_requirements([], REQUIREMENT_FILE_BASIC)
      assert len(diff) == 3
  
      # Invalid requirements should throw LaunchError
      with pytest.raises(LaunchError):
          diff_pip_requirements(REQUIREMENT_FILE_BASIC, ["4$$%2=="])
      with pytest.raises(LaunchError):
          diff_pip_requirements(REQUIREMENT_FILE_BASIC, ["foo~~~~bar"])
  
      # Version mismatch should appear in diff
      diff = diff_pip_requirements(
          REQUIREMENT_FILE_BASIC, REQUIREMENT_FILE_BASIC_2
      )
      assert len(diff) == 3
  
      # Github package should parse fine, but appear in diff
      diff = diff_pip_requirements(
          REQUIREMENT_FILE_BASIC, REQUIREMENT_FILE_GIT
      )
      assert len(diff) == 3
  
imports: import random
  from typing import List
  import pytest
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.utils import diff_pip_requirements, parse_wandb_uri
label_desc: Use image node_id 1 for calling a global function with example usage: test_diff_pip_requirements() without return types