import ast


def extract_symbol_names_from_target(subast) -> list:
    """
    Given an object from a program ast, extract string representations of the names
    of the symbols used in that ast.
    """
    # initialise an empty list of the symbol names
    symbol_names = []
    # walk the target object to look for ast.Name instances
    for walked_ast in ast.walk(subast):
        if type(walked_ast) is ast.Name:
            symbol_names.append(walked_ast.id)
    return symbol_names