<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 automaton.is_accessible
Whether all its states are accessible, i.e., all its states can be reached from an initial state.
Preconditions
Step1:  The following automaton has states that cannot be reached from the initial(s) states
Step2:  Calling accessible returns a copy of the automaton without non-accessible states
<ASSISTANT_TASK:>
Python Code:
import vcsn
Explanation: automaton.is_accessible
Whether all its states are accessible, i.e., all its states can be reached from an initial state.
Preconditions:
- None
See also:
- automaton.accessible
- automaton.is_coaccessible
- automaton.trim
Examples
End of explanation
%%automaton a
context = "lal_char(abc), b"
$ -> 0
0 -> 1 a
1 -> $
2 -> 0 a
1 -> 3 a
a.is_accessible()
Explanation: The following automaton has states that cannot be reached from the initial(s) states:
End of explanation
a.accessible()
a.accessible().is_accessible()
Explanation: Calling accessible returns a copy of the automaton without non-accessible states:
End of explanation
<END_TASK>