code: def get_batch(self):
          
          context = self.context
          parent = api.get_parent(context)
          if context.portal_type == "Batch":
              return context
          elif parent.portal_type == "Batch":
              return parent
          return None
docs: Returns the Batch