class_docstr: Protocol defining the interface of a Dask collection.
class_docstr_tok: ["Protocol","defining","the","interface","of","a","Dask","collection","."]
docstr: Persist this dask collection into memory
  
  This turns a lazy Dask collection into a Dask collection with
  the same metadata, but now with the results fully computed or
  actively computing in the background.
  
  The action of function differs significantly depending on the
  active task scheduler. If the task scheduler supports
  asynchronous computing, such as is the case of the
  dask.distributed scheduler, then persist will return
  *immediately* and the return value's task graph will contain
  Dask Future objects. However if the task scheduler only
  supports blocking computation then the call to persist will
  *block* and the return value's task graph will contain
  concrete Python results.
  
  This function is particularly useful when using distributed
  systems, because the results will be kept in distributed
  memory, rather than returned to the local process as with
  compute.
  
  Parameters
  ----------
  scheduler : string, optional
      Which scheduler to use like "threads", "synchronous" or
      "processes". If not provided, the default is to check the
      global settings first, and then fall back to the
      collection defaults.
  optimize_graph : bool, optional
      If True [default], the graph is optimized before
      computation. Otherwise the graph is run as is. This can be
      useful for debugging.
  **kwargs
      Extra keywords to forward to the scheduler function.
  
  Returns
  -------
  New dask collections backed by in-memory data
  
  See Also
  --------
  dask.persist
docstr_tok: ["Persist","this","dask","collection","into","memory","This","turns","a","lazy","Dask","collection","into","a","Dask","collection","with","the","same","metadata",",","but","now","with","the","results","fully","computed","or","actively","computing","in","the","background",".","The","action","of","function","differs","significantly","depending","on","the","active","task","scheduler",".","If","the","task","scheduler","supports","asynchronous","computing",",","such","as","is","the","case","of","the","dask.distributed","scheduler",",","then","persist","will","return","*","immediately","*","and","the","return","value","'s","task","graph","will","contain","Dask","Future","objects",".","However","if","the","task","scheduler","only","supports","blocking","computation","then","the","call","to","persist","will","*","block","*","and","the","return","value","'s","task","graph","will","contain","concrete","Python","results",".","This","function","is","particularly","useful","when","using","distributed","systems",",","because","the","results","will","be","kept","in","distributed","memory",",","rather","than","returned","to","the","local","process","as","with","compute",".","Parameters","--","--","--","--","--","scheduler",":","string",",","optional","Which","scheduler","to","use","like","``","threads","''",",","``","synchronous","''","or","``","processes","''",".","If","not","provided",",","the","default","is","to","check","the","global","settings","first",",","and","then","fall","back","to","the","collection","defaults",".","optimize_graph",":","bool",",","optional","If","True","[","default","]",",","the","graph","is","optimized","before","computation",".","Otherwise","the","graph","is","run","as","is",".","This","can","be","useful","for","debugging",".","*","*","kwargs","Extra","keywords","to","forward","to","the","scheduler","function",".","Returns","--","--","--","-","New","dask","collections","backed","by","in-memory","data","See","Also","--","--","--","--","dask.persist"]
code: def persist(self: CollType, **kwargs: Any) -> CollType:
      """Persist this dask collection into memory
  
      This turns a lazy Dask collection into a Dask collection with
      the same metadata, but now with the results fully computed or
      actively computing in the background.
  
      The action of function differs significantly depending on the
      active task scheduler. If the task scheduler supports
      asynchronous computing, such as is the case of the
      dask.distributed scheduler, then persist will return
      *immediately* and the return value's task graph will contain
      Dask Future objects. However if the task scheduler only
      supports blocking computation then the call to persist will
      *block* and the return value's task graph will contain
      concrete Python results.
  
      This function is particularly useful when using distributed
      systems, because the results will be kept in distributed
      memory, rather than returned to the local process as with
      compute.
  
      Parameters
      ----------
      scheduler : string, optional
          Which scheduler to use like "threads", "synchronous" or
          "processes". If not provided, the default is to check the
          global settings first, and then fall back to the
          collection defaults.
      optimize_graph : bool, optional
          If True [default], the graph is optimized before
          computation. Otherwise the graph is run as is. This can be
          useful for debugging.
      **kwargs
          Extra keywords to forward to the scheduler function.
  
      Returns
      -------
      New dask collections backed by in-memory data
  
      See Also
      --------
      dask.persist
  
      """
      raise NotImplementedError(
          "Inheriting class must implement this method."
      )
  
imports: from __future__ import annotations
  import abc
  from collections.abc import Callable, Hashable, Mapping, Sequence
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Literal, Protocol, TypeVar, Union, runtime_checkable
label_desc: Use image node_id 7 for calling the DaskCollection obj's underlying member method code with example usage: obj.persist() without return types