def can_contain(parent_type, child_type):
    """ Returns true if parent block can contain child block.
    """
    return (parent_type in ['Document', 'BlockQuote', 'ListItem'] or
            (parent_type == 'List' and child_type == 'ListItem'))