result = pp.process(filepath)
smileses = numpy.array(smiles_list) if return_smiles else None
Result = namedtuple("ParseResult", "dataset,smiles")
if isinstance(result, tuple):
if self.postprocess_fn is not None:
result = self.postprocess_fn(*result)
After Change
if self.postprocess_fn is not None:
result = self.postprocess_fn(*result)
parse_result.update({"dataset": result, "smiles": smileses})
return parse_result
else:
if self.postprocess_fn is not None:
result = self.postprocess_fn(result)
parse_result.update({"dataset": result, "smiles": smileses})