def max_n_consecutive_1s(binary_str):
    """This function takes a number's binary representation
    and return the maximum number of consecutive 1 digits in the
    string.

    Parameters
    ----------
    binary_str : str
        Binary representation of an integer.

    Returns
    -------
    max_n_1s : int
        Maximum number of consecutive 1 digits in the string.
    """
    ones = binary_str.split("0")
    max_n_1s = max(list(map(lambda x: len(x), ones)))
    return max_n_1s