docstr: Make the labels matrix the same size as the guiding objects matrix
  
  The gridding is typically smaller in extent than the image it's
  based on. This function enlarges the labels matrix to match the
  dimensions of the guiding objects matrix if appropriate.
docstr_tok: ["Make","the","labels","matrix","the","same","size","as","the","guiding","objects","matrix","The","gridding","is","typically","smaller","in","extent","than","the","image","it's","based","on",".","This","function","enlarges","the","labels","matrix","to","match","the","dimensions","of","the","guiding","objects","matrix","if","appropriate","."]
code: def fit_labels_to_guiding_objects(self, workspace, labels):
      """Make the labels matrix the same size as the guiding objects matrix
  
      The gridding is typically smaller in extent than the image it's
      based on. This function enlarges the labels matrix to match the
      dimensions of the guiding objects matrix if appropriate.
      """
      if not self.wants_guiding_objects():
          # No guiding objects? No-op
          return labels
  
      guide_label = self.get_guide_labels(workspace)
      if any(guide_label.shape[i] > labels.shape[i] for i in range(2)):
          result = numpy.zeros(
              [
                  max(guide_label.shape[i], labels.shape[i])
                  for i in range(2)
              ],
              int,
          )
          result[0 : labels.shape[0], 0 : labels.shape[1]] = labels
          return result
      return labels
  
imports: from cellprofiler_core.constants.module import HELP_ON_MEASURING_DISTANCES
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import LabelSubscriber, GridSubscriber
  from cellprofiler_core.setting.text import LabelName, Integer
  from cellprofiler_core.utilities.core.module.identify import add_object_location_measurements, add_object_count_measurements, get_object_measurement_columns
  from cellprofiler.modules import _help
  import numpy
  from centrosome.cpmorphology import centers_of_labels
  from cellprofiler_core.utilities.grid import Grid
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects
label_desc: Use image node_id 12 for calling the IdentifyObjectsInGrid obj's underlying member method code with example usage: obj.fit_labels_to_guiding_objects(workspace, labels) and returns: labels, labels, result