def args_and_keywords(function):
    """ Return the information about the function's argument signature.

        Return a list of the function's positional argument names and a
        dictionary containing the function's keyword arguments.

        Example:
            >>> import random
            >>> args, kw = args_and_keywords(random.triangular)
            >>> args
            ('self', 'low', 'high', 'mode')
            >>> sorted(kw.items())
            [('high', 1.0), ('low', 0.0), ('mode', None)]

    """
    arg_count = function.__code__.co_argcount
    arg_names = function.__code__.co_varnames[:arg_count]
    try:
        kw_arg_count = len(function.__defaults__)
        kw_names = arg_names[-kw_arg_count:]
        kw_dict = dict(list(zip(kw_names, function.__defaults__)))
    except TypeError:
        kw_dict = {}

    return arg_names, kw_dict