def set_onsite(onsite, tags):
    """
    Check method *set_onsite*.
    :raises TypeError: Parameter onsite must be a dictionary.
    :raises ValueError: Parameter onsite keys must be a tag.
    :raises ValueError: Parameter onsite values must be
      real and/or complex numbers.
    """
    if not isinstance(onsite, dict):
        raise TypeError('\n\nParameter onsite must be a dictionary.\n')
    for tag, val in onsite.items():
        if tag not in tags:
            raise ValueError('\n\nParameter onsite keys must be a tag.\n')
        if not isinstance(val, (int, float, complex)):
            raise ValueError(
                '\n\nParameter onsite values must be\nreal and/or complex numbers.\n'
                )
