async def METHOD_NAME(*,
                            project: str,
                            bucket: str,
                            lifecycle_days: Optional[int],
                            labels: Optional[Dict[str, str]],
                            verbose: bool):
    from hailtop.utils import CalledProcessError, check_exec_output  # pylint: disable=import-outside-toplevel
    if labels:
        labels_str = ','.join(f'{k}={v}' for k, v in labels.items())
    else:
        labels_str = None
    try:
        if lifecycle_days:
            lifecycle_policy = {
                "rule": [
                    {
                        "action": {"type": "Delete"},
                        "condition": {"age": lifecycle_days}
                    }
                ]
            }
            with tempfile.NamedTemporaryFile(mode='w') as f:
                f.write(json.dumps(lifecycle_policy))
                f.flush()
                await check_exec_output('gcloud', '--project', project, 'storage', 'buckets', 'update',
                                        f'--lifecycle-file={f.name}', f'gs://{bucket}', echo=verbose)
        if labels_str:
            await check_exec_output('gcloud', '--project', project, 'storage', 'buckets', 'update',
                                    f'--update-labels={labels_str}', f'gs://{bucket}', echo=verbose)
    except CalledProcessError as e:
        if 'does not have storage.buckets.get access to the Google Cloud Storage bucket' in e.stderr.decode('utf-8'):
            msg = f'ERROR: You do not have the necessary permissions to update bucket {bucket} in project {project}. Ask a project administrator ' \
                  f'to assign you the StorageAdmin role in Google Cloud Storage for bucket {bucket} or ask them to update the bucket {bucket} on your behalf.'
            if lifecycle_days:
                msg += f'Update the bucket to have a lifecycle policy of {lifecycle_days} days.'
            if labels_str:
                msg += f'Update the bucket to have labels: {labels_str}'
            raise InsufficientPermissions(msg) from e
        raise