def METHOD_NAME(C_branch_bus_f, C_branch_bus_t, branch_active, bus_active):
    """
    Compute the adjacency matrix
    :param C_branch_bus_f: Branch-bus_from connectivity matrix
    :param C_branch_bus_t: Branch-bus_to connectivity matrix
    :param branch_active: array of branches availability
    :param bus_active: array of buses availability
    :return: Adjacency matrix
    """
    br_states_diag = diags(branch_active)
    Cf = br_states_diag * C_branch_bus_f
    Ct = br_states_diag * C_branch_bus_t
    # branch - bus connectivity
    C_branch_bus = Cf + Ct
    # Connectivity node - Connectivity node connectivity matrix
    C_bus_bus = diags(bus_active) * (C_branch_bus.T * C_branch_bus)
    return C_bus_bus