def METHOD_NAME(self, metadata=None, **options):
    if metadata is None:
        metadata = {}
    pkg_info, dist = self.create_dist(**metadata)
    cmd = check(dist)
    cmd.initialize_options()
    for name, value in options.items():
        setattr(cmd, name, value)
    cmd.ensure_finalized()
    cmd.run()
    return cmd