def setup_go_func(func, arg_types=None, res_type=None):
    """
    Set up Go function, so it know what types it should take and return.
    :param func: Specify Go function from library.
    :param arg_types: List containing file types that function is taking. Default: None.
    :param res_type: File type that function is returning. Default: None.
    :return: Returns func arg back for cases when you want to setup function and assign it to variable in one line.
    """
    if arg_types is not None:
        func.argtypes = arg_types
    if res_type is not None:
        func.restype = res_type
    return func