<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Connected Patterns
This notebook contains the graphviz code to recrete the connected patterns diagram.
Make logos
Step1:  interactions diagram
The diagram was created with XMind.  Here, we just add the logo.
<ASSISTANT_TASK:>
Python Code:
%%bash
sudo apt-get update -y
sudo apt-get install -y imagemagick
%%bash
convert -resize 10% ../mldp_cover.png logo_small.png
convert -resize 25% ../mldp_cover.png logo_medium.png
# convert -resize 65% ../mldp_cover.png -bordercolor green -border 5 logo_large.png
convert -resize 180% ../mldp_cover_color.jpg -bordercolor green -border 5 logo_large.png
%%bash
dot -Tpng connected-patterns.gv -o tmp.png
convert tmp.png logo_small.png -gravity north -geometry +50+10 -composite connected-patterns.png
rm tmp.png
def display_image(filename):
    from IPython.display import HTML, display
    html = '<img src="{}" style="float: left; margin-right: 10px;" />'.format(filename)
    print(html)
    display(HTML(html))
display_image('./connected-patterns.png')
Explanation: Connected Patterns
This notebook contains the graphviz code to recrete the connected patterns diagram.
Make logos
End of explanation
%%bash
convert mldp_interactions.png logo_large.png \
        -gravity center -geometry +0+0 -composite \
        -bordercolor red -border 10 \
        -caption "Machine Learning Design Patterns; by Lakshmanan, Robinson, Munn; O'Reilly 2020" \
        machine-learning-design-patterns.png
display_image('./machine-learning-design-patterns.png')
Explanation: interactions diagram
The diagram was created with XMind.  Here, we just add the logo.
End of explanation
<END_TASK>