code: def test_txt2img(self, pipeline: SamplingPipeline, sampler_enum):
      output = pipeline.text_to_image(
          params=SamplingParams(sampler=sampler_enum.value, steps=10),
          prompt="A professional photograph of an astronaut riding a pig",
          negative_prompt="",
          samples=1,
      )
  
      assert output is not None
  
file_path: generative-models/tests/inference/test_inference.py
imports: import numpy
  from PIL import Image
  import pytest
  from pytest import fixture
  import torch
  from typing import Tuple
  from sgm.inference.api import model_specs, SamplingParams, SamplingPipeline, Sampler, ModelArchitecture
  import sgm.inference.helpers
label_desc: Use image node_id 4 for calling the TestInference obj's underlying member method code with example usage: obj.test_txt2img(pipeline, sampler_enum) without return types