def generate_missing_location_msg(filepath, errors):
    """Generate error message for missing location LookupError."""
    msg = (
        "Unused step implementation"
        if filepath.endswith(".py")
        else "Step implementation not found"
    )

    if len(errors) == 1:
        msg += ". Also registered an error: {}".format(str(errors[0]))
    elif errors:
        msg += ". Also registered {} errors, " "use :BehaveErrors to see them.".format(
            len(errors)
        )

    return msg