code: def calculate(
      self, data: pd.DataFrame, is_root=False
  ) -> Union[pd.Series, pd.DataFrame]:
      if isinstance(self.op, PandasOperand):
          if self.op.is_vector:
              ds = [child.calculate(data) for child in self.children]
              new_data = self.op.calculate(data=ds)
          else:
              d1 = self.children[0].calculate(data)
              d2 = (
                  None
                  if len(self.children) < 2
                  else self.children[1].calculate(data)
              )
              new_data = self.op.calculate(data=d1, left=d1, right=d2)
      else:
          raise NotImplementedError(
              f"Unrecognized operator {self.op.name}."
          )
  
      if (str(new_data.dtype) == "category") | (
          str(new_data.dtype) == "object"
      ):
          pass
      else:
          new_data = new_data.replace([-np.inf, np.inf], np.nan)
  
      if is_root:
          self.data = new_data
      return new_data
  
imports: import hashlib
  import itertools
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from pandas._typing import DtypeObj
  from upgini.autofe.all_operands import find_op
  from upgini.autofe.operand import Operand, PandasOperand
label_desc: Use image node_id 12 for calling the Feature obj's underlying member method code with example usage: obj.calculate(data, is_root) and returns: new_data