<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def execute_query(client, workspace, analytics_query, timespan=None, workspaces=None):
 """Executes a query against the provided Log Analytics workspace."""

    from .vendored_sdks.loganalytics.models import QueryBody
    return client.query(workspace, QueryBody(query=analytics_query, timespan=timespan, workspaces=workspaces))