human
Complete this python program:
def _get_all_test_targets(test_path=None):
assistant
#Here is the Python program you requested.

    """Returns a list of test targets for all classes under test_path
    containing tests.
    """
    def _convert_to_test_target(path):
        'Remove    the    .py    suffix    and    replace    all    slashes    with    periods.'
        return os.path.relpath(path, os.getcwd())[:(-3)].replace('/', '.')
    base_path = os.path.join(os.getcwd(), (test_path or ''))
    result = []
    for root in os.listdir(base_path):
        if any([(s in root) for s in ['.git', 'third_party', 'core/tests']]):
            continue
        if root.endswith('_test.py'):
            result.append(_convert_to_test_target(os.path.join(base_path, root)))
        for (subroot, _, files) in os.walk(os.path.join(base_path, root)):
            for f in files:
                if (f.endswith('_test.py') and (os.path.join('core', 'tests') not in subroot)):
                    result.append(_convert_to_test_target(os.path.join(subroot, f)))
    return result