code: def compression_level(n, q, n_oversamples=10, min_subspace_size=20):
      """Compression level to use in svd_compressed
  
      Given the size ``n`` of a space, compress that that to one of size
      ``q`` plus n_oversamples.
  
      The oversampling allows for greater flexibility in finding an
      appropriate subspace, a low value is often enough (10 is already a
      very conservative choice, it can be further reduced).
      ``q + oversampling`` should not be larger than ``n``.  In this
      specific implementation, ``q + n_oversamples`` is at least
      ``min_subspace_size``.
  
      Parameters
      ----------
      n: int
          Column/row dimension of original matrix
      q: int
          Size of the desired subspace (the actual size will be bigger,
          because of oversampling, see ``da.linalg.compression_level``)
      n_oversamples: int, default=10
          Number of oversamples used for generating the sampling matrix.
      min_subspace_size : int, default=20
          Minimum subspace size.
  
       Examples
      --------
      >>> compression_level(100, 10)
      20
      """
      return min(max(min_subspace_size, q + n_oversamples), n)
  
imports: from __future__ import annotations
  import operator
  import warnings
  from functools import partial
  from numbers import Number
  import numpy
  import tlz
  from dask.array.core import Array, concatenate, dotmany, from_delayed
  from dask.array.creation import eye
  from dask.array.random import RandomState, default_rng
  from dask.array.utils import array_safe, meta_from_array, solve_triangular_safe, svd_flip
  from dask.base import tokenize, wait
  from dask.blockwise import blockwise
  from dask.delayed import delayed
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import apply, derived_from
label_desc: Use image node_id 7 for calling a global function with example usage: compression_level(n, q, n_oversamples, min_subspace_size) and returns: min