code: def _make_rankfile(tmp_path):
      hosts = "batch\n10.10.10.0\n10.10.10.1\n10.10.10.2\n10.10.10.3"
      p = tmp_path / "lsb_djob_rankfile"
      p.write_text(hosts)
      return str(p)
  
file_path: pytorch-lightning/tests/tests_fabric/plugins/environments/test_lsf.py
imports: import os
  from unittest import mock
  import pytest
  from lightning.fabric.plugins.environments import LSFEnvironment
label_desc: Use image node_id 1 for calling a global function with example usage: _make_rankfile(tmp_path) and returns: str