code: def extract_tar(filename, dirname, strip_components=None):
      if os.path.exists(dirname):
          shutil.rmtree(dirname)
      return archive.extract_tar(filename, dirname, strip_components)
  
imports: import errno
  import hashlib
  import os
  import shutil
  import socket
  import tarfile
  import threading
  import six
  import pytest
  import yatest.common
  import library.python.archive
label_desc: Use image node_id 1 for calling a global function with example usage: extract_tar(filename, dirname, strip_components) and returns: archive