docstr: Pickles a Python object and stores it in `File` value object.
  
  This way you can upload any Python object for future use.
  
  Args:
      obj: An object to be converted.
          Supported are `Altair`, `Bokeh`, `Plotly`, `Matplotlib` interactive charts,
          and `Pandas` `DataFrame` objects.
  
  Returns:
      ``File``: value object with pickled object.
  
  Examples:
      >>> import neptune
      >>> from neptune.types import File
      >>> run = neptune.init_run()
  
      Pickle model object and upload it
  
      >>> run["results/pickled_model"].upload(File.as_pickle(trained_model))
  
  You may also want to check `as_pickle docs page`_.
  
  .. _as_pickle docs page:
     https://docs.neptune.ai/api/field_types#as_pickle
docstr_tok: ["Pickles","a","Python","object","and","stores","it","in","`","File","`","value","object",".","This","way","you","can","upload","any","Python","object","for","future","use",".","Args",":","obj",":","An","object","to","be","converted",".","Supported","are","`","Altair","`",",","`","Bokeh","`",",","`","Plotly","`",",","`","Matplotlib","`","interactive","charts",",","and","`","Pandas","`","`","DataFrame","`","objects",".","Returns",":","``","File","``",":","value","object","with","pickled","object",".","Examples",":",">",">",">","import","neptune",">",">",">","from","neptune.types","import","File",">",">",">","run","=","neptune.init_run","(",")","Pickle","model","object","and","upload","it",">",">",">","run","[","``","results\/pickled_model","''","]",".upload","(","File.as_pickle","(","trained_model",")",")","You","may","also","want","to","check","`","as_pickle","docs","page","`","_",".","..","_as_pickle","docs","page",":","https",":","\/\/docs.neptune.ai\/api\/field_types","#","as_pickle"]
code: def as_pickle(obj) -> "File":
      """Pickles a Python object and stores it in `File` value object.
  
      This way you can upload any Python object for future use.
  
      Args:
          obj: An object to be converted.
              Supported are `Altair`, `Bokeh`, `Plotly`, `Matplotlib` interactive charts,
              and `Pandas` `DataFrame` objects.
  
      Returns:
          ``File``: value object with pickled object.
  
      Examples:
          >>> import neptune
          >>> from neptune.types import File
          >>> run = neptune.init_run()
  
          Pickle model object and upload it
  
          >>> run["results/pickled_model"].upload(File.as_pickle(trained_model))
  
      You may also want to check `as_pickle docs page`_.
  
      .. _as_pickle docs page:
         https://docs.neptune.ai/api/field_types#as_pickle
      """
      content = get_pickle_content(obj)
      return File.from_content(
          content if content is not None else b"", extension="pkl"
      )
  
imports: from io import IOBase
  from typing import TYPE_CHECKING, Optional, TypeVar, Union
  from neptune.internal.types.file_types import FileComposite, InMemoryComposite, LocalFileComposite, StreamComposite
  from neptune.internal.utils import verify_type
  from neptune.internal.utils.images import get_html_content, get_image_content, get_pickle_content, is_altair_chart, is_bokeh_figure, is_matplotlib_figure, is_numpy_array, is_pandas_dataframe, is_pil_image, is_plotly_figure, is_seaborn_figure
  from neptune.types.atoms.atom import Atom
label_desc: Use image node_id 14 for calling the File obj's underlying member method code with example usage: obj.as_pickle(obj) and returns: File