<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sever_sink_ports(self, context, ports, connected_to=None):
 # type: (AContext, APortMap, str) -> None """Conditionally sever Sink Ports of the child. If connected_to is then None then sever all, otherwise restrict to connected_to's Source Ports Args: context (Context):
 The context to use ports (dict):
 {part_name: [PortInfo]} connected_to (str):
 Restrict severing to this part """

        # Find the Source Ports to connect to
        if connected_to:
            # Calculate a lookup of the Source Port "name" to type
            source_port_lookup = self._source_port_lookup(
                ports.get(connected_to, []))
        else:
            source_port_lookup = True

        # Find our Sink Ports
        sink_ports = self._get_flowgraph_ports(ports, SinkPortInfo)

        # If we have Sunk Ports that need to be disconnected then do so
        if sink_ports and source_port_lookup:
            child = context.block_view(self.mri)
            attribute_values = {}
            for name, port_info in sink_ports.items():
                if source_port_lookup is True or source_port_lookup.get(
                        child[name].value, None) == port_info.port:
                    attribute_values[name] = port_info.disconnected_value
            child.put_attribute_values(attribute_values)