from typing import Callable
from typing import Optional
from typing import Tuple
import multiprocessing


def start_process(
    target: Callable, args: Optional[Tuple] = None
) -> multiprocessing.Process:
    """Start a process from with the multiprocessing framework.

    Parameters
    ----------
    target: callable
    args: tuple, optional

    Returns
    -------
    p: Process

    """
    if args:
        p = multiprocessing.Process(target=target, args=args)
    else:
        p = multiprocessing.Process(target=target)
    p.start()
    return p