class_docstr: Class for mapping a function to sequences.
  
  This will distribute the sequences according the a mapper, and call
  the function on each sub-sequence.  If called via map, then the function
  will be called once on each element, rather that each sub-sequence.
  
  Parameters
  ----------
  
  view : View instance
      The view to be used for execution
  f : callable
      The function to be wrapped into a remote function
  dist : str [default: 'b']
      The key for which mapObject to use to distribute sequences
      options are:
  
      * 'b' : use contiguous chunks in order
      * 'r' : use round-robin striping
  
  block : bool [default: None]
      Whether to wait for results or not.  The default behavior is
      to use the current `block` attribute of `view`
  chunksize : int or None
      The size of chunk to use when breaking up sequences in a load-balanced manner
  ordered : bool [default: True]
      Whether the result should be kept in order. If False,
      results become available as they arrive, regardless of submission order.
  return_exceptions : bool [default: False]
  **flags
      remaining kwargs are passed to View.temp_flags
class_docstr_tok: ["Class","for","mapping","a","function","to","sequences",".","This","will","distribute","the","sequences","according","the","a","mapper",",","and","call","the","function","on","each","sub-sequence",".","If","called","via","map",",","then","the","function","will","be","called","once","on","each","element",",","rather","that","each","sub-sequence",".","Parameters","--","--","--","--","--","view",":","View","instance","The","view","to","be","used","for","execution","f",":","callable","The","function","to","be","wrapped","into","a","remote","function","dist",":","str","[","default",":","'","b","'","]","The","key","for","which","mapObject","to","use","to","distribute","sequences","options","are",":","*","'","b","'",":","use","contiguous","chunks","in","order","*","'","r","'",":","use","round-robin","striping","block",":","bool","[","default",":","None","]","Whether","to","wait","for","results","or","not",".","The","default","behavior","is","to","use","the","current","`","block","`","attribute","of","`","view","`","chunksize",":","int","or","None","The","size","of","chunk","to","use","when","breaking","up","sequences","in","a","load-balanced","manner","ordered",":","bool","[","default",":","True","]","Whether","the","result","should","be","kept","in","order",".","If","False",",","results","become","available","as","they","arrive",",","regardless","of","submission","order",".","return_exceptions",":","bool","[","default",":","False","]","*","*","flags","remaining","kwargs","are","passed","to","View.temp_flags"]
code: def __init__(
      self,
      view,
      f,
      dist="b",
      block=None,
      chunksize=None,
      ordered=True,
      return_exceptions=False,
      **flags,
  ):
      super().__init__(view, f, block=block, **flags)
      self.chunksize = chunksize
      self.ordered = ordered
      self.return_exceptions = return_exceptions
  
      mapClass = Map.dists[dist]
      self.mapObject = mapClass()
  
file_path: ipyparallel/ipyparallel/client/remotefunction.py
imports: import sys
  import warnings
  from inspect import signature
  from decorator import decorator
  from ..serialize import PrePickled
  from .None import map
  from .asyncresult import AsyncMapResult
label_desc: Use image node_id 1 to create a new ParallelFunction object from inherited base classes: RemoteFunction with example: obj = ParallelFunction(view, f, dist, block, chunksize, ordered, return_exceptions)