def METHOD_NAME(self, line="", cell=None) -> List[Tuple[str, List[str]]]:
    """
    Ioc Extract IPython magic extension.
    Parameters
    ----------
    line : str, optional
        Line contents, by default ""
    cell : str, optional
        Cell contents, by default None
    Returns
    -------
    List[Tuple[str, List[str]]]
        List of tuples of IoCs found grouped by type.
    """
    args = magic_arguments.parse_argstring(self.METHOD_NAME, line)
    ioc_types = None
    if args.ioc_types:
        ioc_types = [ioc_type.strip() for ioc_type in args.ioc_types.split(",")]
    if cell is None:
        results = self._ioc_extract.extract(src=line, ioc_types=ioc_types)
    else:
        results = self._ioc_extract.extract(src=cell, ioc_types=ioc_types)
    iocs = [(ioc_type, list(ioc_res)) for ioc_type, ioc_res in results.items()]
    if args.out is not None:
        self.shell.user_ns[args.out] = results  # type: ignore
    return iocs