import inspect
import importlib


def classes_from_file(file_path):
    """
    returns names of all classes defined in the file given by 'file_path'
    """

    class_names = []

    for name, cls in inspect.getmembers(
        importlib.import_module(file_path), inspect.isclass
    ):
        if cls.__module__ == file_path:
            class_names.append(name)

    return class_names