
from jsonschema.exceptions import (
    ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
)
from jsonschema._format import (
    FormatChecker,
    draft3_format_checker,
    draft4_format_checker,
    draft6_format_checker,
    draft7_format_checker,
)
from jsonschema._types import TypeChecker
from jsonschema.validators import (
    Draft3Validator,
    Draft4Validator,
    Draft6Validator,
    Draft7Validator,
    RefResolver,
    validate,
)

import importlib_metadata
__version__ = importlib_metadata.version("jsonschema")


from jsonschema.exceptions import (
    ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
)
from jsonschema._format import (
    FormatChecker,
    draft3_format_checker,
    draft4_format_checker,
    draft6_format_checker,
    draft7_format_checker,
)
from jsonschema._types import TypeChecker
from jsonschema.validators import (
    Draft3Validator,
    Draft4Validator,
    Draft6Validator,
    Draft7Validator,
    RefResolver,
    validate,
)
try:
    from importlib import metadata
except ImportError: # for Python<3.8
    import importlib_metadata as metdata
__version__ = metadata.version("jsonschema")

Use importlib from std (if possible)
Use importlib from std (if possible)
  
  from jsonschema.exceptions import (
      ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
  )
  from jsonschema._format import (
      FormatChecker,
      draft3_format_checker,
      draft4_format_checker,
      draft6_format_checker,
      draft7_format_checker,
  )
  from jsonschema._types import TypeChecker
  from jsonschema.validators import (
      Draft3Validator,
      Draft4Validator,
      Draft6Validator,
      Draft7Validator,
      RefResolver,
      validate,
  )
+ try:
+     from importlib import metadata
+ except ImportError: # for Python<3.8
+     import importlib_metadata as metdata
+ __version__ = metadata.version("jsonschema")
  
- import importlib_metadata
- __version__ = importlib_metadata.version("jsonschema")
- 
Use importlib from std (if possible)
## Code Before:

from jsonschema.exceptions import (
    ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
)
from jsonschema._format import (
    FormatChecker,
    draft3_format_checker,
    draft4_format_checker,
    draft6_format_checker,
    draft7_format_checker,
)
from jsonschema._types import TypeChecker
from jsonschema.validators import (
    Draft3Validator,
    Draft4Validator,
    Draft6Validator,
    Draft7Validator,
    RefResolver,
    validate,
)

import importlib_metadata
__version__ = importlib_metadata.version("jsonschema")

## Instruction:
Use importlib from std (if possible)
## Code After:

from jsonschema.exceptions import (
    ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
)
from jsonschema._format import (
    FormatChecker,
    draft3_format_checker,
    draft4_format_checker,
    draft6_format_checker,
    draft7_format_checker,
)
from jsonschema._types import TypeChecker
from jsonschema.validators import (
    Draft3Validator,
    Draft4Validator,
    Draft6Validator,
    Draft7Validator,
    RefResolver,
    validate,
)
try:
    from importlib import metadata
except ImportError: # for Python<3.8
    import importlib_metadata as metdata
__version__ = metadata.version("jsonschema")
