def METHOD_NAME(
    size: int,
    dtype: str = "object",
    na_ratio: float = 0.0,
    str_max_len: int = 100,
    random_state: Union[int, np.random.RandomState] = 0,
) -> pd.Series:
    """
    Return a randomly generated Pandas Series.
    Parameters
    ----------
    size: int
        The size of the generated series
    dtype: string
        The type of the generated series.
        Chosen from 'int', 'float', 'boolean', 'datetime', 'string' and 'object'.
    na_ratio: float
        The ratio of NA values in the series. Should be in [0.0, 1.0]
    str_max_len: int
        The max len of random string
    seed: int
        generator seed
    """
    gen_func: Mapping[str, Callable[..., pd.Series]] = {
        "int": _gen_random_int_series,
        "float": _gen_random_float_series,
        "boolean": _gen_random_bool_series,
        "datetime": _gen_random_datatime_series,
        "string": _gen_random_string_series,
    }
    if (dtype not in gen_func) and dtype != "object":
        raise NotImplementedError(f"dtype {dtype} generator is not implemented.")
    rand = _resolve_random_state(random_state)
    # Generate non-NA series then replace some with NA.
    # This can keep the type as the original type rather than object.
    population_list = []
    for curr_type in gen_func:
        if dtype in [curr_type, "object"]:
            if curr_type != "string":
                rand_series = gen_func[curr_type](size, random_state=rand)
            else:
                rand_series = gen_func[curr_type](size, max_len=str_max_len, random_state=rand)
            population_list.append(rand_series)
    object_population = pd.concat(population_list, ignore_index=True)
    object_series = pd.Series(rand.choice(object_population, size=size))
    # Replace some values with NA.
    na_pos = object_series.sample(frac=na_ratio, random_state=rand).index
    if not na_pos.empty:
        object_series[na_pos] = np.nan
    return object_series