parameters: (self, loom_outputs, apply_fn=lambda x: x)
return_statement: return results
docstring: Get `SamplingPlaceholder`s for each `loom_output`.
docstring_summary: Get `SamplingPlaceholder`s for each `loom_output`.
docstring_tokens: Get SamplingPlaceholder s for each loom_output .
function: def register(self, loom_outputs, apply_fn=lambda x: x):
      """Get `SamplingPlaceholder`s for each `loom_output`."""
      if not isinstance(loom_outputs, (list, tuple)):
        loom_outputs = [loom_outputs]
        was_singleton = True
      else:
        was_singleton = False
  
      results = []
      for loom_output in loom_outputs:
        self.loom_input.add_output(loom_output)
        output_type_shape = self.loom_input.get_type_shape(loom_output)
        result = SamplingPlaceholder(output_type_shape,
                                     self.type_shape_counts[output_type_shape],
                                     apply_fn, self)
        self.type_shape_counts[output_type_shape] += 1
        results.append(result)
  
      if was_singleton:
        return results[0]
      return results
function_tokens: def register ( self , loom_outputs , apply_fn = lambda x : x ) : if not isinstance ( loom_outputs , ( list , tuple ) ) : loom_outputs = [ loom_outputs ] was_singleton = True else : was_singleton = False results = [ ] for loom_output in loom_outputs : self . loom_input . add_output ( loom_output ) output_type_shape = self . loom_input . get_type_shape ( loom_output ) result = SamplingPlaceholder ( output_type_shape , self . type_shape_counts [ output_type_shape ] , apply_fn , self ) self . type_shape_counts [ output_type_shape ] += 1 results . append ( result ) if was_singleton : return results [ 0 ] return results