@staticmethod
def depends_statement(cookbook_name, metadata=None):
    """Return a valid Ruby 'depends' statement for the metadata.rb file."""
    line = "depends '%s'" % cookbook_name
    if metadata:
        if not isinstance(metadata, dict):
            raise TypeError(
                'Stencil dependency options for %s should be a dict of options, not %s.'
                 % (cookbook_name, metadata))
        if metadata:
            line = "%s '%s'" % (line, "', '".join(metadata))
    return line
