code: def test_make_relpath(tmp_dir, monkeypatch):
      from dvc.utils.strictyaml import make_relpath
  
      path = tmp_dir / "dvc.yaml"
      expected_path = (
          "./dvc.yaml" if os.name == "posix" else ".\\dvc.yaml"
      )
      assert make_relpath(path) == expected_path
  
      (tmp_dir / "dir").mkdir(exist_ok=True)
      monkeypatch.chdir("dir")
  
      expected_path = (
          "../dvc.yaml" if os.name == "posix" else "..\\dvc.yaml"
      )
      assert make_relpath(path) == expected_path
  
file_path: dvc/tests/func/utils/test_strict_yaml.py
imports: import os
  import pytest
  from ruamel.yaml import __with_libyaml__
  from dvc.cli import main
label_desc: Use image node_id 5 for calling a global function with example usage: test_make_relpath(tmp_dir, monkeypatch) without return types