<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def loadcell(self, raw_files, cellpy_file=None, mass=None, summary_on_raw=False, summary_ir=True, summary_ocv=False, summary_end_v=True, only_summary=False, only_first=False, force_raw=False, use_cellpy_stat_file=None):
 """Loads data for given cells. Args: raw_files (list):
 name of res-files cellpy_file (path):
 name of cellpy-file mass (float):
 mass of electrode or active material summary_on_raw (bool):
 use raw-file for summary summary_ir (bool):
 summarize ir summary_ocv (bool):
 summarize ocv steps summary_end_v (bool):
 summarize end voltage only_summary (bool):
 get only the summary of the runs only_first (bool):
 only use the first file fitting search criteria force_raw (bool):
 only use raw-files use_cellpy_stat_file (bool):
 use stat file if creating summary from raw Example: """


        # This is a part of a dramatic API change. It will not be possible to
        # load more than one set of datasets (i.e. one single cellpy-file or
        # several raw-files that will be automatically merged)
        self.logger.info("started loadcell")
        if cellpy_file is None:
            similar = False
        elif force_raw:
            similar = False
        else:
            similar = self.check_file_ids(raw_files, cellpy_file)
        self.logger.debug("checked if the files were similar")

        if only_summary:
            self.load_only_summary = True
        else:
            self.load_only_summary = False

        if not similar:
            self.logger.info("cellpy file(s) needs updating - loading raw")
            self.logger.debug(raw_files)
            self.from_raw(raw_files)
            self.logger.debug("loaded files")
            # Check if the run was loaded ([] if empty)
            if self.status_datasets:
                if mass:
                    self.set_mass(mass)
                if summary_on_raw:
                    self.make_summary(all_tests=False, find_ocv=summary_ocv,
                                      find_ir=summary_ir,
                                      find_end_voltage=summary_end_v,
                                      use_cellpy_stat_file=use_cellpy_stat_file)
            else:
                self.logger.warning("Empty run!")

        else:
            self.load(cellpy_file)
        return self