docstr: Prepare to create a batch file
  
  This function is called when CellProfiler is about to create a
  file for batch processing. It will pickle the image set list's
  "legacy_fields" dictionary. This callback lets a module prepare for
  saving.
  
  pipeline - the pipeline to be saved
  image_set_list - the image set list to be saved
  fn_alter_path - this is a function that takes a pathname on the local
                  host and returns a pathname on the remote host. It
                  handles issues such as replacing backslashes and
                  mapping mountpoints. It should be called for every
                  pathname stored in the settings or legacy fields.
docstr_tok: ["Prepare","to","create","a","batch","file","This","function","is","called","when","CellProfiler","is","about","to","create","a","file","for","batch","processing",".","It","will","pickle","the","image","set","list's","''","legacy_fields","''","dictionary",".","This","callback","lets","a","module","prepare","for","saving",".","pipeline","-","the","pipeline","to","be","saved","image_set_list","-","the","image","set","list","to","be","saved","fn_alter_path","-","this","is","a","function","that","takes","a","pathname","on","the","local","host","and","returns","a","pathname","on","the","remote","host",".","It","handles","issues","such","as","replacing","backslashes","and","mapping","mountpoints",".","It","should","be","called","for","every","pathname","stored","in","the","settings","or","legacy","fields","."]
code: def prepare_to_create_batch(self, workspace, fn_alter_path):
      """Prepare to create a batch file
  
      This function is called when CellProfiler is about to create a
      file for batch processing. It will pickle the image set list's
      "legacy_fields" dictionary. This callback lets a module prepare for
      saving.
  
      pipeline - the pipeline to be saved
      image_set_list - the image set list to be saved
      fn_alter_path - this is a function that takes a pathname on the local
                      host and returns a pathname on the remote host. It
                      handles issues such as replacing backslashes and
                      mapping mountpoints. It should be called for every
                      pathname stored in the settings or legacy fields.
      """
      self.rules_directory.alter_for_create_batch_files(fn_alter_path)
      return True
  
imports: from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, C_CHILDREN, C_PARENT, C_LOCATION, C_NUMBER, FTR_OBJECT_NUMBER, C_COUNT, FTR_CENTER_X, FTR_CENTER_Y, FTR_CENTER_Z
  from cellprofiler_core.module.image_segmentation import ObjectProcessing
  from cellprofiler_core.preferences import DEFAULT_INPUT_FOLDER_NAME, ABSOLUTE_FOLDER_NAME, DEFAULT_INPUT_SUBFOLDER_NAME, DEFAULT_OUTPUT_SUBFOLDER_NAME
  from cellprofiler_core.setting import Divider, HiddenCount, SettingsGroup, Measurement, Binary, ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import Directory, Filename, Float, LabelName
  from cellprofiler.modules import _help
  import logging
  import os
  import numpy
  import scipy
  import scipy.ndimage
  import scipy.sparse
  import cellprofiler.gui.help
  import cellprofiler_core.object
  from cellprofiler.utilities.rules import Rules
label_desc: Use image node_id 29 for calling the FilterObjects obj's underlying member method code with example usage: obj.prepare_to_create_batch(workspace, fn_alter_path) and returns: True