A federal judge ruled Wednesday that Walgreens can be held responsible for contributing to San Francisco’s opioid crisis for over-dispensing opioids for years without proper oversight and failing to identify and report suspicious orders as required by law.