Read controlfile parameter.

def read_args(**kwargs):
    """Read controlfile parameter."""
    if kwargs.get("control"):
        args = Namespace(control=kwargs["control"])
    elif config.CONTROLFILE:
        args = Namespace(control=config.CONTROLFILE)
    elif config.DB.get("control_table_name"):
        args = Namespace(control="sql")
    elif config.AWS.get("control_table_name"):
        args = Namespace(control="dynamodb")
    else:
        # read cli args
        parser = argparse.ArgumentParser()
        parser.add_argument("--control", required=True, help="Control file, can be path.")
        args = parser.parse_args()
    return args