<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def analyze_async(output_dir, dataset, cloud=False, project_id=None):
 """Analyze data locally or in the cloud with BigQuery. Produce analysis used by training. This can take a while, even for small datasets. For small datasets, it may be faster to use local_analysis. Args: output_dir: The output directory to use. dataset: only CsvDataSet is supported currently. cloud: If False, runs analysis locally with Pandas. If Ture, runs analysis in the cloud with BigQuery. project_id: Uses BigQuery with this project id. Default is datalab's default project id. Returns: A google.datalab.utils.Job object that can be used to query state from or wait. """

  import google.datalab.utils as du
  with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    fn = lambda: _analyze(output_dir, dataset, cloud, project_id)  # noqa
    return du.LambdaJob(fn, job_id=None)