  import sys
  from argparse import Namespace
  from typing import List, Dict, Optional, Tuple, TYPE_CHECKING, Union
  
  import numpy as np
  from tqdm import tqdm
 
</s> remove         inputs = self._input_locations
 </s> add  </s> remove             extract.process()
 </s> add             if len(self._input_locations) > 1:
                # TODO - Running this in a process is hideously hacky. However, there is a memory
                # leak in some instances when running in batch mode. Many days have been spent
                # trying to track this down to no avail (most likely coming from C-code.) Running
                # the extract job inside a process prevents the memory leak in testing. This should
                # be replaced if/when the memory leak is found
                proc = Process(target=extract.process)
                proc.start()
                proc.join()
            else:
                extract.process() </s> remove                 logger.info("Processing job %s of %s: '%s'", job_no + 1, len(inputs), location)
 </s> add                 logger.info("Processing job %s of %s: '%s'",
                            job_no + 1, len(self._input_locations), location) </s> remove             del thread
 </s> add 
from multiprocessing import Process
  import sys
  from argparse import Namespace
from multiprocessing import Process
  from typing import List, Dict, Optional, Tuple, TYPE_CHECKING, Union
  
  import numpy as np
  from tqdm import tqdm
keep add keep keep keep keep
 Bugfix: Patch extract memory leak in batch mode 
scripts/extract.py