import inspect


def create_signature(args=None, kwargs=None):
    """Create a inspect.Signature object based on args and kwargs.

    Args:
        args (list or None): The names of positional or keyword arguments.
        kwargs (list or None): The keyword only arguments.

    Returns:
        inspect.Signature

    """
    args = [] if args is None else args
    kwargs = {} if kwargs is None else kwargs

    parameter_objects = []
    for arg in args:
        param = inspect.Parameter(
            name=arg,
            kind=inspect.Parameter.POSITIONAL_OR_KEYWORD,
        )
        parameter_objects.append(param)

    for arg in kwargs:
        param = inspect.Parameter(
            name=arg,
            kind=inspect.Parameter.KEYWORD_ONLY,
        )
        parameter_objects.append(param)

    sig = inspect.Signature(parameters=parameter_objects)
    return sig