def RequiresPackage(package_name):
  def Decorator(test_function):
    @functools.wraps(test_function)
    def Wrapper(*args, **kwargs):
      try:
        pkg_resources.get_distribution(package_name)
      except pkg_resources.DistributionNotFound:
        raise unittest.SkipTest(
            "Skipping, package %s not installed" % package_name)
      return test_function(*args, **kwargs)
    return Wrapper
  return Decorator
Gets the first Wi-Fi interface name.
dataset/ETHPy150Open google/grr/grr/lib/test_lib.py/RequiresPackage--crossover with--dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/wifi_network_order.py/GetWifiInterface