class_docstr: Test the import_optional function.
docstr: Test import_optional correctly imports names from installed module.
code: def test_import_optional_names(self):
      """Test import_optional correctly imports names from installed module."""
      from requests import get, post
  
      get2, post2 = import_optional("requests", names=["get", "post"])
      assert get2 == get
      assert get2.__name__ == "get"
      assert post2 == post
      assert post2.__name__ == "post"
  
file_path: alibi/alibi/utils/tests/test_import_optional.py
imports: import pytest
  from alibi.utils.missing_optional_dependency import import_optional, ERROR_TYPES, MissingDependency
label_desc: Use image node_id 4 for calling the TestImportOptional obj's underlying member method code with example usage: obj.test_import_optional_names() without return types