human
Complete this python program:
def get_tests_for(python_name):
assistant
#Here is the Python code you requested.

    """Find all tests for the given ``python_name``.
    :param python_name: Either directory in ``REPOSITORY`` or a Python FQPN
    importable from ``REPOSITORY``.
    :return: PSet of test names.
    """
    def _extract_ids(t):
        if isinstance(t, TestSuite):
            result = pset()
            for sub_tests in t:
                result = (result | _extract_ids(sub_tests))
            return result
        else:
            return pset([t.id()])
    loader = TestLoader()
    tests = loader.loadByName(python_name, recurse=True)
    return _extract_ids(tests)