def parse_definitions(definitions):
    """Extract machine rules and initial states from the given machine definitions.

    :param definitions: Definitions are state machine definitions with the following structure:
                        {
                            <Machine name>: (<Initial State>, {<From state>: {<Action>: (<To State>, [<Precondition 1>,
                                                                                                      <Precondition 2>,
                                                                                                      ...])
                                                                              ...
                                                                             },
                                                              ...
                                                              },
                                            )
                            ...
                        }
                        Where:
                            <Machine name> is a string representing a machine.
                            <Initial State> is a string representing the initial state of the associated machine.
                            <From state> is a string representing the state from which a transition may happen.
                            <Action> is a string representing an action that may be performed to make a state
                            transition.
                            <To State> is a string representing the end state of an associated action.
                            <Precondition 1>, <Precondition 2>, etc., are mappings of the form:
                                {
                                    <Machine name>: [<State 1>, <State 2>, ...],
                                }
                                Where: <State 1>, <State 2>, etc., are strings representing the various states the
                                       corresponding machine needs to be in.
                                Which is considered satisfied if and only if all the machines are in one of their
                                associated states.

                        Each machine and its associated rules are independently defined. The states and actions
                        available to one machine may not be apply to another in the given definition. Each state and
                        action mentioned in this documentation is specific to its associated machine.
    :return:            A tuple of 2 mappings, viz., (<rules>, <states>) where:
                        <rules> is a mapping with the following structure:
                            {
                                <Machine name>: {<From state>: {<Action>: (<To State>, [<Precondition 1>,
                                                                                        <Precondition 2>,
                                                                                        ...])
                                                                ...
                                                               },
                                                ...
                                                },
                                ...
                            }
                            Where:
                                <Machine name> is a string representing a machine.
                                <From state> is a string representing the state from which a transition may happen.
                                <Action> is a string representing an action that may be performed to make a state
                                transition.
                                <To State> is a string representing the end state of an associated action.
                                <Precondition 1>, <Precondition 2>, etc., are mappings of the form:
                                    {
                                        <Machine name>: [<State 1>, <State 2>, ...],
                                    }
                                    Where: <State 1>, <State 2>, etc., are strings representing the various states the
                                           corresponding machine needs to be in.
                                    Which is considered satisfied if and only if all the machines are in one of their
                                    associated states.

                            Each machine and its associated rules are independently defined. The states and actions
                            available to one machine may not be apply to another in the given definition. Each state and
                            action mentioned in this documentation is specific to its associated machine.
                        <states> is a mapping representing the initial states of all the machines in the following form:
                            {
                                <Machine 1 name (str)>: <Machine 1 state (str)>,
                                ...
                            }
    """
    rules = {}
    states = {}
    for name, (state, definition) in definitions.items():
        rules[name] = definition
        states[name] = state
    return rules, states