code: def from_versions(cls, versions):
      return cls(
          {
              "releases": {
                  v: [{"filename": v + ".whl", "upload_time": v}]
                  for v in versions
              }
          }
      )
  
imports: import functools
  import re
  import tempfile
  from contextlib import contextmanager
  from pathlib import Path
  from unittest import mock
  import pytest
  from dev.set_matrix import generate_matrix
label_desc: Use image node_id 4 for calling the MockResponse obj's underlying member method code with example usage: obj.from_versions(cls, versions) and returns: cls