from typing import Union
from typing import Dict
from typing import Any
from typing import List


def _func_length(target_attr: Union[Dict[str, Any], List[Any]], *_: Any) -> int:
    """Function for returning the length of a dictionary or list."""
    return len(target_attr)